aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
Commit message (Collapse)AuthorAgeFilesLines
* turnip: Configure VPC for geometry shadersBrian Ho2020-04-071-37/+1
| | | | | | | | | | This commit updates tu6_emit_vpc to selectively emit GS-specifc configuration. Most of this is repurposed from fd6_program.c. This also refactors `link_geometry_stages` to ir3_nir_lower_tess.c so it can be shared between fd and tu. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4436>
* lima: avoid situations when scissor minx > maxx or miny > maxyVasily Khoruzhick2020-04-052-34/+48
| | | | | | | | | | Clip scissor to viewport and then to framebuffer to avoid that since hardware can't handle this case. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4427> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4427>
* etnaviv: convert perfmon queries to acc queriesChristian Gmeiner2020-04-058-242/+172
| | | | | | Signed-off-by: Christian Gmeiner <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
* etnaviv: move generic perfmon functionality into own fileChristian Gmeiner2020-04-056-578/+650
| | | | | | | | | This change removes the basic infrastructure to work with perfmon from the perfmon query impl and puts it into its own place. Makes the whole series easier to review and ends smaller changes. Signed-off-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
* etnaviv: extend acc sample provide with an allocate(..)Christian Gmeiner2020-04-055-77/+126
| | | | | | | We might be able to sub-class etna_acc_query. Signed-off-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
* etnaviv: extend result(..) to return if data is readyChristian Gmeiner2020-04-052-6/+10
| | | | | | | | For the upcoming conversion of perfmon queries to the acc query framework we need a way to tell that the data is not ready. Signed-off-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
* etnaviv: make use of a fixed size array to track of all acc query providerChristian Gmeiner2020-04-051-17/+16
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
* etnaviv: extend acc query provider with supports(..) functionChristian Gmeiner2020-04-052-0/+18
| | | | | | | | Move the logic if a query provider supports a query_type directly to the provider. Signed-off-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
* etnaviv: rework wait/flush logicChristian Gmeiner2020-04-051-14/+8
| | | | | | | | Saves us from doing an extra flush in !wait case and seems more logical now. Also evaluate etna_bo_cpu_prep(..) retun value. Signed-off-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
* etnaviv: reset no_wait_cnt after triggered flushChristian Gmeiner2020-04-051-1/+4
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
* etnaviv: explicitly call resource_written(..)Christian Gmeiner2020-04-052-3/+2
| | | | | | | | | | | We might end in cases where etna_acc_get_query_result(..) gets called within one draw call (aka before flushing). At this point the status of the resource was not set but gets used in etna_acc_get_query_result(..) to handle different wait cases. Fix this issue by calling resource_written(..) explicitly. Signed-off-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
* etnaviv: rework etna_acc_sample_providerChristian Gmeiner2020-04-052-23/+11
| | | | | | | | | | Simplify the interface a sampler provider needs to implement. The start(..) and stop(..) functions got called by resume(..) and suspend(..) so lets get rid of start(..) and stop(..). Also the way we count and use samples is much easier to follow now. Signed-off-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
* etnaviv: rename hw queries to acc queriesChristian Gmeiner2020-04-057-102/+105
| | | | | | | | | | | | | | | | The name hw queries was choosen as occlusion queries are 'feeling' like nothing special. It is possible to interact with them only via the command stream - unlike perfom queries where some kernel magic is needed. Accumulated HW queries is a much better name for this type of queries. We read some hardware values over some draw calls and need to accumulate them to get the final result. This is some prep work for the following perfmon changes. Signed-off-by: Christian Gmeiner <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
* freedreno: limit fp16 to frag and computeRob Clark2020-04-041-0/+2
| | | | | | | | To avoid dealing w/ some backend varying linking issues when mixing precision vs geom/tess. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4423>
* freedreno/ir3: also precompile compute shaders for shaderdbRob Clark2020-04-041-0/+10
| | | | | | | | Similar as with draw shaders, nothing will trigger the final variant in shader-db. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4423>
* freedreno: fix missing lockingRob Clark2020-04-041-0/+2
| | | | | | Fixes: d0b3ccb0607 ("freedreno: Fix detection of being in a blit for acc queries.") Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4423>
* freedreno/a6xx: add some compute loggingRob Clark2020-04-042-2/+21
| | | | | Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4423>
* iris: Set alignments on cbuf0 and constant readsJason Ekstrand2020-04-031-0/+4
| | | | | Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4367>
* nv50: don't try to upload MSAA settings for BUFFER texturesIlia Mirkin2020-04-031-1/+1
| | | | | | | | | | | | | | We need the MSAA scaling parameters to properly fetch samples from MSAA textures. These are stored in the miptree which wraps all regular textures. However it does not wrap buffer textures, so make sure to skip them rather than accessing out-of-bounds or unmapped memory. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2727 Fixes: 3bd40073b98 ("nv50: add support for texelFetch'ing MS textures") Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4424> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4424>
* freedreno: Rename RB_DONE_TSConnor Abbott2020-04-024-7/+7
| | | | | | | This makes the various cache_flush implementations make more sense. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4065> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4065>
* radeonsi: dump shader stats when hitting the live cachePierre-Eric Pelloux-Prayer2020-04-021-2/+20
| | | | | | | | | | | | | With the introduction of the live shader cache, when a shader is fetched from the cache no stats are printed for shaderdb. So in a sequence like this: vs1, fs1, vs1, fs2, shaderdb may see 3 or 4 lines, depending on the threads being used. If one run produces 3 lines while the other produces 4 lines, it would compare vs1 stats with fs2 stats. Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4355> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4355>
* gallium/llvmpipe: add an optimised 32-bit memsetDave Airlie2020-04-011-4/+2
| | | | | | | | | | | | This might have other users beyond filling/clearing buffers, increase a fullscreen 4k gears from 68->74 fps on my Ryzen since gears is really just a clear benchmark, and this helps clearing. Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4394> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4394>
* gallium/swr: Re-enable scratch space for client-memory buffersKrzysztof Raszkowski2020-04-012-13/+32
| | | | | | | | | | | Commit 7d33203b446cdfa11c2aaea18caf05b120a16283 fixed race condition in freeing scratch memory mechanism but that approach creates performance regression in some cases. This change revert previous changes and fix freeing scratch memory mechanism. Reviewed-by: Bruce Cherniak <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4406> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4406>
* gallium/swr: Fix array stride problem.Krzysztof Raszkowski2020-04-011-2/+3
| | | | | | Reviewed-by: Bruce Cherniak <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4405> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4405>
* svga: Treat forced coherent maps as maps of persistent memoryThomas Hellstrom2020-04-012-18/+7
| | | | | | | | | | | | | | | | | A previous commit made sure we sent a BindGBSurface command at map time rather than at unmap time for persistent memory. To be consistent, do the same for forced coherent maps. This makes it possible to avoid the explicit UpdateGBSurface at unmap time for discard maps and to instead rely on the kernel's dirty-tracking mechanism at the cost of an additional flush. Tested with SVGA_FORCE_COHERENT=1, piglit run quick. No regressions. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4399> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4399>
* svga, winsys/svga: Fix persistent memory discard mapsThomas Hellstrom2020-04-013-5/+38
| | | | | | | | | | | | | | | | | | | | The kernel driver requires immediate notification using a BindGBSurface command when a graphics coherent memory resource changes backing MOB, so that it can start dirty-tracking the new MOB. Since we always use graphics coherent memory for persistent memory, enqueue and flush a BindGBSurface commmand at map time rather than at unmap time. Since we're dealing with persistent memory, It's OK to flush while mapped. This fixes an issue with gnome-shell / Wayland which uses persistent memory together with discard maps when we advertise ARB_buffer_storage. XWayland clients will render incorrectly. Fixes: 71b43490dd ("svga: Support ARB_buffer_storage") Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Neha Bhende <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Reviewed-by: Roland Scheidegger <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4399>
* freedreno/log: fix build errorRob Clark2020-04-011-2/+4
| | | | | | | | | | | | | | | | It seems some versions of gcc are less clever about const initializers: ``` ../src/gallium/drivers/freedreno/freedreno_log.c:58:33: error: initializer element is not constant const unsigned msgs_per_chunk = bo_size / sizeof(uint64_t); ^~~~~~~ ``` See https://gitlab.freedesktop.org/mesa/mesa/-/issues/2713 Signed-off-by: Rob Clark <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4390> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4390>
* freedreno: Drop an unnecessary include marked "this should go away"Eric Anholt2020-03-311-3/+0
| | | | | | | | It came in with the initial import, and doesn't seem to be necessary any more. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4289> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4289>
* scons: prune unused Makefile.sourcesEric Engestrom2020-03-311-185/+0
| | | | | | | | | | Fixes: 2e92d3381988a85b2a6d ("scons: Prune out unnecessary targets.") Signed-off-by: Eric Engestrom <[email protected]> Reviewed by: Jose Fonseca <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4373> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4373>
* lima: also check tiled and depth case when importQiang Yu2020-03-311-19/+20
| | | | | | | | | We missed the tiled and depth case when check buffer alignment. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4362> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4362>
* lima: fix buffer import with offsetQiang Yu2020-03-311-4/+15
| | | | | | | | | | | | | | | | | | | | With EGL_EXT_image_dma_buf_import, user can import dma_buf with offset. This is also used by AOSP GLConsumer::updateTexImage with HAL_PIXEL_FORMAT_YV12 buffer which store YUV planes in the same buffer with offset. Render sample from it using GL_OES_EGL_image_external. This should fix some video display problem when using MediaCodec soft decoding which generates HAL_PIXEL_FORMAT_YV12 buffer and render it on screen. Test program: https://github.com/yuq/gfx/tree/master/yuv2rgb/dma-buf Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4362>
* panfrost: Enable PIPE_SHADER_CAP_FP16 on BifrostAlyssa Rosenzweig2020-03-311-1/+4
| | | | | | | | We don't have fp16 implemented on Midgard yet but on Bifrost we can flip it on now. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
* panfrost: Move device open/close to root panfrostAlyssa Rosenzweig2020-03-311-39/+3
| | | | | | | We need it for standalone testing too. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
* panfrost: Move pan_bo to root panfrostAlyssa Rosenzweig2020-03-3110-726/+33
| | | | | | | | | | | | | Now that its Gallium dependencies have been resolved, we can move this all out to root. The only nontrivial change here is keeping the pandecode calls in Gallium-panfrost to avoid creating a circular dependency between encoder/decoder. This could be solved with a third drm folder but this seems less intrusive for now and Roman would probably appreciate if I went longer than 8 hours without breaking the Android build. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
* panfrost: Inline reference counting routinesAlyssa Rosenzweig2020-03-312-13/+16
| | | | | | | | | We use only a very small subset of the capabilities of pipe_reference (just wrappers for atomic ints..). Let's inline it and drop the dependency on Gallium from pan_bo. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
* panfrost: Isolate panfrost_bo_access_for_stage to pan_cmdstream.cAlyssa Rosenzweig2020-03-312-17/+17
| | | | | | | | We don't use it outside this file (and really shouldn't) and it has a strict Gallium dependency in pan_bo.h. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
* panfrost: Split panfrost_device from panfrost_screenAlyssa Rosenzweig2020-03-3114-222/+170
| | | | | | | | | | We would like to access properties of the device in a Gallium-independent way (for out-of-Gallium testing in the short-term, and would help a theoretical Vulkan implementation in the long run). Let's split up the struct. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4382>
* panfrost: Add support for R3G3B2Icecream952020-03-311-1/+3
| | | | | | | Tested with texenv from mesa-demos. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292>
* panfrost: Mark 64-bit formats as unsupportedIcecream952020-03-311-0/+3
| | | | | | | | | | There is no hardware support for these formats, but some games use them for vertex data. This fixes a crash in Aleph One. Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4292>
* freedreno/log: avoid duplicate ts'sRob Clark2020-03-301-4/+27
| | | | | | | | | | | | | | In cases where `fd_log()`/`fd_log_stream()` are called multiple times back-to-back, just use the timestamp of the first trace. This seems to avoid some occasional GPU hangs I was seeing with logging enabled. Although not exactly sure the reason for the hangs. (Looks like GPU hangs *after* all the cmdstream is processed, according to crashdec.) Signed-off-by: Rob Clark <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno/a6xx: add some more tracepointsRob Clark2020-03-303-1/+25
| | | | | Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno: add some initial fd_log tracepointsRob Clark2020-03-301-4/+17
| | | | | | | Mostly convert over existing DBG traces. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno/a6xx: timestamp logging supportRob Clark2020-03-302-2/+16
| | | | | Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno: add logging infrastructureRob Clark2020-03-3012-2/+378
| | | | | | | | Provides a way to log msgs timestamped at the corresponding position in the GPU cmdstream, mostly for the purposes of profiling. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno: remove some obsolete debug optionsRob Clark2020-03-302-11/+4
| | | | | | | | | | 'fraghalf' is unused (superceeded by actually lowering output based on the precision information in nir). And glsl140 support in ir3 is long past the experimental stage, so the glsl120 option is no longer needed. So remove them and free up some bits for new things. Signed-off-by: Rob Clark <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4366>
* freedreno: Work around UBWC flakiness.Eric Anholt2020-03-301-0/+13
| | | | | | | | | | | | | | | | | | In trying to track down the new failure in #2670, I found that I could get the flaky test set down to 4 tests, and dropping any remaining test wouldn't trigger the failure (a bad 8x4 block in the middle of dEQP-GLES3.functional.fbo.msaa.4_samples.r16f's render target). Disabling gmem or bypass didn't help, and adding lots of CCU flushing didn't help. What did help was disabling blitting, or this memset to initialize the UBWC area after we (presumably) pull a BO out of the BO cache. My guess is that the 2D blitter can't handle some rare set of state in the flags buffer and emits some garbage. I've run 8 gles3 and 7 gles31 runs with this branch now so hopefully I've got the4 right set of flakes marked for removal. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2670 Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4290> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4290>
* freedreno: Fix detection of being in a blit for acc queries.Eric Anholt2020-03-3010-37/+30
| | | | | | | | | | | | | | | | | The batch might not have stage == FD_STAGE_BLIT set because fd_blitter_pipe_begin was sticking the stage on some random batch (or none at all) rather than the one that would be used in the meta operation. What we actually wanted to be looking at was set_active_query_state(), which is already called by util_blitter and whose state we just needed to track. Fixes piglit occlusion_query_meta_no_fragments. I haven't changed query_hw.c's stage handling to clean the rest up because I don't have a db410c/db820c at home to iterate over the piglit tests. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
* freedreno: Rename "is_blit" to "is_discard_blit"Eric Anholt2020-03-305-8/+8
| | | | | | | It's about the special case of an overwrite of a level meaning we can discard old batch contents. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
* freedreno/a6xx: Fix timestamp queries.Eric Anholt2020-03-301-4/+10
| | | | | | | | | | | | | | | We were returning the same kind of result as time_elapsed (an end - start time in ns), which on a timestamp query is approximately zero since begin/end are at the same point in time. What we're supposed to return is a converted-to-ns timestamp based on the GPU clock. Remove the _pause() function for time_elapsed to reduce the command stream overhead, and just capture start (which is, unfortunately, going to happen on each tile and thus the final start value we ready will be the last tile of the frame, not the first). Fixes piglit spec/arb_timer_query/query gl_timestamp Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>
* freedreno: Count blits in GL_TIME_ELAPSED and perf counter queries.Eric Anholt2020-03-305-6/+8
| | | | | | Fixes 0 gpu time reported for glBlitFramebuffer in apitrace replay --pgpu. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4356>