summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/etnaviv
AgeCommit message (Collapse)AuthorFilesLines
2019-01-10etnaviv: fix typo in cflush_all descriptionGuido Günther1-1/+1
Signed-off-by: Guido Günther <guido.gunther@puri.sm> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2019-01-07etnaviv: annotate variables only used in debug buildLucas Stach1-7/+4
Some of the status variables in the compiler are only used in asserts and thus may be unused in release builds. Annotate them accordingly to avoid 'unused but set' warnings from the compiler. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2019-01-07etnaviv: enable full overwrite in a few more casesLucas Stach1-4/+7
Take into account the render target format when checking if the color mask affects all channels of the RT. This allows to enable full overwrite in a few cases where a non-alpha format is used. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2018-12-28etnaviv: Consolidate buffer references from framebuffersTomeu Vizoso3-10/+9
We were leaking surfaces because the references taken in etna_set_framebuffer_state weren't being released on context destroy. Instead of just directly releasing those references in etna_context_destroy, use the util_copy_framebuffer_state helper. Take the chance to remove the duplicated buffer references in compiled_framebuffer_state to avoid confusion. The leak can be reproduced with a client that continuously creates and destroys contexts. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reported-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2018-12-18meson: add etnaviv to the tools optionChristian Gmeiner1-1/+2
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2018-12-18etnaviv: use surface format directlyLucas Stach2-9/+4
There is no need to do the detour over the resource behind the surface to get the format. Use the surface format directly. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-12-14etnaviv: drop redundant ctx function parameterChristian Gmeiner1-4/+3
There is no need to have an extra ctx paramter as all the other parameters carry all the needed information. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
2018-11-19etnaviv: use dummy RT buffer when rendering without color bufferLucas Stach3-2/+19
At least GC2000 seems to push some dirt from the PE color cache into the last bound render target when drawing depth only. Newer cores seem to behave properly and don't do this, but I have found no way to fix it on GC2000. Flushes and stalls don't seem to make any difference. In order to stop the core from pushing the dirt into a precious real render target, plug in dummy buffer when rendering without a color buffer. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-11-15etnaviv: Make sure rs alignment checks matchGuido Günther1-6/+13
etna_resource_alloc and etna_resource_from_handle currently use different checks. This leads to etna_resource_from_handle:492: target=2, format=PIPE_FORMAT_B8G8R8X8_UNORM, 1080x1920x1, array_size=1, last_level=0, nr_samples=0, usage=0, bind=8000a, flags=0 etna_resource_from_handle:541: BO stride 4320 is too small for RS engine width padding (4352, format PIPE_FORMAT_B8G8R8X8_UNORM) since etna_resource_from_handle wants to be aligned to a 16 byte boundary while the etna_resource_alloc does not. Adjust the two checks by using a common function. Broken by baff59ebf07a114f95ad66d1f54e4b1f409eebee Signed-off-by: Guido Günther <guido.gunther@puri.sm> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2018-10-30gallium: rework PIPE_HANDLE_USAGE_* flagsMarek Olšák1-1/+1
Only radeonsi uses them, so adjust them to match its needs.
2018-10-04etnaviv: Use write combine instead of unached mappings for shader boGuido Günther1-1/+1
The later are sensitive to unaligned accesses on arm64[1] and we don't need an uncached mapping here. [1]: https://lists.freedesktop.org/archives/etnaviv/2018-September/001956.html Signed-off-by: Guido Günther <guido.gunther@puri.sm> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
2018-09-10etnaviv: Reduce max offset to available hardware bits.Mathias Fröhlich1-0/+2
Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
2018-09-07gallium: add PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGETMarek Olšák1-0/+1
2018-09-06gallium: enable GL_AMD_depth_clamp_separate on r600, radeonsiMarek Olšák1-0/+1
2018-09-04gallium: Add a helper for implementing PIPE_CAP_* default values.Eric Anholt1-3/+3
One of the pains of implementing a gallium driver is filling in a million pipe caps you don't know about yet when you're just starting out. One of the pains of working on gallium is copy-and-pasting your new PIPE_CAP into each driver. We can fix both of these by having each driver call into the default helper from their default case, so that both sides can ignore each other until they need to. v2: fix i915g build, revert swr change to avoid breaking scons build (https://travis-ci.org/anholt/mesa/jobs/419739857) v3: Rebase on 3 new gallium caps. Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1) Cc: Bruce Cherniak <bruce.cherniak@intel.com> Cc: George Kyriazis <george.kyriazis@intel.com> Cc: Kenneth Graunke <kenneth@whitecape.org>
2018-08-24gallium: Split out PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE.Kenneth Graunke1-0/+1
Some hardware can do PIPE_TEX_WRAP_MIRROR_REPEAT but not PIPE_TEX_WRAP_MIRROR_CLAMP and PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER. Drivers for such hardware would like to advertise support for ARB_texture_mirror_clamp_to_edge but not EXT_texture_mirror_clamp. This commit adds a new PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE bit, changes the extension enable to be based on that, and enables it in all upstream drivers which supported PIPE_CAP_TEXTURE_MIRROR_CLAMP (so they continue supporting this mode).
2018-08-23gallium: add PIPE_CAP_MAX_SHADER_BUFFER_SIZEMarek Olšák1-0/+3
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-08-23gallium: add PIPE_CAP_MAX_GS_INVOCATIONSMarek Olšák1-0/+3
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-07-31gallium: add storage_sample_count parameter into is_format_supportedMarek Olšák1-1/+6
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-07-31gallium: add PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTSMarek Olšák1-0/+1
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
2018-07-31etnaviv: fix typo in query namesChristian Gmeiner1-2/+2
Fixes: d0bed0b4944d ("etnaviv: support HI performance counters") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Chris Healy <cphealy@gmail.com>
2018-06-20gallium: add scalar isa shader capChristian Gmeiner1-0/+1
v1 -> v2: - nv30 is _NOT_ scalar as suggested by Ilia Mirkin. - Change from a screen cap to a shader cap as suggested by Eric Anholt. - radeonsi is scalar as suggested by Marek Olšák. - Change missing ones to be scalar. v2 -> v3: - r600 prefers vec4 as suggested by Marek Olšák. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-06-14gallium: add support for programmable sample locationsRhys Perry1-0/+1
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> (v2) Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v2)
2018-05-29gallium: add PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITYMarek Olšák1-0/+1
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
2018-05-30gallium/winsys: rename DRM_API_HANDLE_* to WINSYS_HANDLE_*Dave Airlie2-6/+6
This just renames this as we want to add an shm handle which isn't really drm related. Originally by: Marc-André Lureau <marcandre.lureau@gmail.com> (airlied: I used this sed script instead) This was generated with: git grep -l 'DRM_API_' | xargs sed -i 's/DRM_API_/WINSYS_/g' Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-05-16etnaviv: Fix missing rnndb file in tarballsStuart Young2-0/+2
Seems that when the rnndb files for etniviv were updated/included back in Nov 2017, hw/texdesc_3d.xml.h was missed from Makefile.sources and meson.build. This was all during the conversion to meson, so it apears to have slipped through the cracks. As such, this file has been missing from the official tarballs since inclusion in Mesa, so the git trees and tarballs differ. Found due to lintian errors in the Debian packages. Fixes: f1e1c60ff6 ("etnaviv: Update from rnndb") Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2018-05-11etnaviv: remove pipe_fence_handle::ctxRob Clark1-2/+0
A fence can outlive the ctx it was created from (see glmark2).. etnaviv doesn't actually need fence->ctx so lets remove it before someone makes the mistake of assuming it is a valid pointer. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2018-04-30gallium: add initial support for conservative rasterizationRhys Perry1-0/+10
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-04-27etnaviv: remove not needed includesChristian Gmeiner1-3/+0
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-04-27etnaviv: remove redundant includeChristian Gmeiner1-2/+0
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-04-20etnaviv: fix texture_format_needs_swizLucas Stach1-1/+1
memcmp returns 0 when both swizzles are the same, which means we don't need any hardware swizzling. texture_format_needs_swiz should return true when the return value of the memcmp is non-zero. Fixes: 751ae6afbefd ("etnaviv: add support for swizzled texture formats") Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Tested-by: Marek Vasut <marex@denx.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
2018-04-09etnaviv: meson: add etnaviv_query_pm.[ch] to the sourcesEmil Velikov1-0/+2
Otherwise building the driver will fail with unresolved symbols. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105960 Fixes: 72d2043be06 ("etnaviv: add perfmon query implementation") Cc: Christian Gmeiner <christian.gmeiner@gmail.com> Cc: Clayton Craft <clayton.a.craft@intel.com> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2018-04-08etnaviv: expose perfmon query groupsChristian Gmeiner1-2/+6
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: add query_group_info for perfmon countersChristian Gmeiner2-0/+50
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: assign group_ids to perfmon queriesChristian Gmeiner2-1/+56
Prep work for AMD_performance_monitor support. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: support MC performance countersChristian Gmeiner2-0/+25
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: support TX performance countersChristian Gmeiner2-0/+73
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: support RA performance countersChristian Gmeiner2-0/+57
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: support SE performance countersChristian Gmeiner2-0/+17
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: support PA performance countersChristian Gmeiner2-0/+49
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: support SH performance countersChristian Gmeiner2-0/+73
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: support PE performance countersChristian Gmeiner2-0/+34
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: support HI performance countersChristian Gmeiner2-0/+41
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: add perfmon query implementationChristian Gmeiner7-2/+357
Add needed infrastructure to use performance monitor requests for queries. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Chris Healy <cphealy@gmail.com>
2018-04-08etnaviv: sw queries: return correct number of groupsChristian Gmeiner1-1/+1
Fixes: 3d912bd742ed ("etnaviv: add query_group_info for sw counters") Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2018-04-08etnaviv: advertise YUV formats as external onlyLucas Stach1-1/+1
We only support importing YUV as OES external resources. This will change in the future, but for now this fixes the advertised capabilities in eglQueryDmaBufModifiersEXT. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2018-03-29util: Add and use util_is_power_of_two_nonzeroIan Romanick1-1/+1
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
2018-03-29util: Move util_is_power_of_two to bitscan.h and rename to ↵Ian Romanick2-2/+3
util_is_power_of_two_or_zero The new name make the zero-input behavior more obvious. The next patch adds a new function with different zero-input behavior. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Suggested-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
2018-03-20gallium: add packed uniform CAPTimothy Arceri1-0/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2018-03-16etnaviv: remove superfluous \n from DBG(..) callersChristian Gmeiner4-6/+6
The DBG(..) macro appends a \n already so there is no need to do it twice. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>