Commit Graph

145472 Commits

Author SHA1 Message Date
Pierre-Eric Pelloux-Prayer 09dc0fb2ee loader/dri3: avoid reusing the same back buffer with DRI_PRIME
For DRI_PRIME setup where the dGPU -> iGPU copy can happen asynchronously,
we need to ensure that we're not continuously reusing the same back buffer.

The existing code relies on XCB_PRESENT_EVENT_IDLE_NOTIFY to decide if
a buffer is busy or idle. If this event is received before the hardware
is done using the buffer, then it will reuse the same buffer and introduce
a dependency between the copy and the next frame.

This commit mitigates this by trying to allocate a different back buffer
when called from dri3_get_buffer (not from dri3_find_back_alloc, because it
seems that it expects dri3_get_buffer - see 0cc4c7e33e).

An alternative would be to query the busy-ness using is_resource_busy
but this complicates the code to achieve the same result.

One affected app is Unigine Superposition, and this change improves the
score by 0% - 5% depending on the settings.

This behavior is enabled if PIPE_CAP_PREFER_BACK_BUFFER_REUSE is 0.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788>
2021-09-29 08:14:57 +00:00
Pierre-Eric Pelloux-Prayer e67083caf4 gallium: add PIPE_CAP_PREFER_BACK_BUFFER_REUSE
This will be used in the next commit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12788>
2021-09-29 08:14:57 +00:00
Corentin Noël d89ba3f2a9 virgl: Set GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION to 1
The resulting quads are actually already following the provoking vertex convention.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12851>
2021-09-29 07:53:39 +00:00
Vinson Lee 77d2bdb0a2 pps: Avoid duplicate elements in with_datasources array.
Setting -Dperfetto=true and -Ddatasources=intel,panfrost to the
meson command line resulted in duplicate elements.

Fixes: 92180a4376 ("pps: Intel pps driver")
Fixes: 513d1baaea ("pps: Panfrost pps driver")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12379>
2021-09-29 07:26:18 +00:00
Guilherme Gallo fd71ccf4d7 ci: Uprev deqp-runner to 0.9.0
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13088>
2021-09-29 05:47:55 +00:00
Marek Olšák 049c366378 radeonsi: don't set DX10_DIAMOND_TEST_ENA for better performance
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13093>
2021-09-28 19:34:07 -04:00
Alejandro Piñeiro 1898ee5493 v3d/v3dv: add unlikely for any V3D_DEBUG check
We had some with unlikely, some without it. Let's just put unlikely to
all of them.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13071>
2021-09-28 22:30:29 +00:00
Alejandro Piñeiro 0e5601e6f3 broadcom/common: remove unused debug helper
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13071>
2021-09-28 22:30:29 +00:00
Dave Airlie 6db1434480 lavapipe: fixup image binding flags.
This removes a bunch of warnings in the debug logs on CI

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13091>
2021-09-29 07:57:22 +10:00
Dave Airlie 3010c86094 lavapipe: cleanup image create function.
drop the wrapper as it's unused and make things static.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13091>
2021-09-29 07:57:07 +10:00
Jason Ekstrand 0793b259b0 panvk: Switch to common GetDeviceQueue and DeviceWaitIdle
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:26 +00:00
Jason Ekstrand 06ac3b1bea lavapipe: Switch to common GetDeviceQueue and DeviceWaitIdle
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:26 +00:00
Jason Ekstrand f3040c6e05 lavapipe: Simplify DeviceWaitIdle
No reason to duplicate the guts of QueueWaitIdle inside DeviceWaitIdle.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:26 +00:00
Jason Ekstrand 01622bee5e v3dv: Use the common GetDeviceQueue implementation
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:26 +00:00
Jason Ekstrand c6210d5aa9 turnip: Switch to common GetDeviceQueues2 and DeviceWaitIdle
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:26 +00:00
Jason Ekstrand 7416c6f0a4 radv: Switch to common GetDeviceQueues2 and DeviceWaitIdle
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:26 +00:00
Jason Ekstrand cc9f34cdd6 anv: Switch to common GetDeviceQueues2 and DeviceWaitIdle
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand 0e4266260a vulkan/device: Add a common DeviceWaitIdle implementation
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand 3b535d28d2 vulkan/device: Add a common GetDeviceQueue2 implementation
If we store the queues in a linked list in the device as vk_queue_init
is called then we can handle enumeration in common code.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand 0d80799ccd panvk: Drop panvk_queue::flags/queue_family_index
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand 713af72048 v3dv: Drop v3dv_queue::flags
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand 8619c6df62 turnip: Drop tu_queue::flags/queue_family_index/queue_idx
They're now part of vk_queue.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand 6c8b0b35a6 lavapipe: Drop lvp_queue::flags
It's now part of vk_queue

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand 7a2868967d radv: Drop radv_queue::flags/queue_family_index/queue_idx
They're now part of vk_queue.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand 317c5ebf3e anv: Drop anv_queue::flags
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand b2313b6884 vulkan: Add the pCreateInfo to vk_queue_init()
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand 1815271f0a panvk: Use vk_command_buffer
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand 9846783001 panvk: Use vk_queue
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13003>
2021-09-28 21:08:25 +00:00
Jason Ekstrand afb3d7a804 iris: Return 1 for PIPE_COMPUTE_CAP_IMAGES_SUPPORTED
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13072>
2021-09-28 20:54:29 +00:00
Jason Ekstrand 5f8e043fb6 iris: Handle states=NULL in iris_bind_sampler_states
Clover likes to do this to clear our a bunch of samplers without
actually passing an array of NULL pointers.  It's easy enough to
handle in iris.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13072>
2021-09-28 20:54:29 +00:00
Yiwei Zhang 5a9f907d94 venus: properly check and fill ahb buffer properties
When it comes to AHB, pExternalBufferInfo->handleType is already
overridden to the renderer handle type. Thus the AHB buffer prop path is
not used. However, this is not caught by cts, vvl or apps because the
host renderer memory features so far satisfy the ahb requirement.

Fixes: ebf0e45506 ("venus: add ahb image and buffer properties query support")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13076>
2021-09-28 20:41:40 +00:00
Luis Felipe Strano Moraes 489d325757 docs: Add documentation regarding INTEL_MEASURE to envvars doc.
This was initially written by Mark Janes, and was part of MR 7354.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Mike Blumenkrantz <michael.b.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13043>
2021-09-28 20:09:03 +00:00
Luis Felipe Strano Moraes 884198cb26 docs: Clean up environment variable docs for Intel drivers.
- Change section name to be more general
- Remove INTEL_SCALAR_VS (dropped as part of release 20.3)
- Sort alphabetically

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Mike Blumenkrantz <michael.b.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13043>
2021-09-28 20:09:03 +00:00
Daniel Schürmann 40a93e271c aco: clang-format
No changes, just formatting.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13087>
2021-09-28 19:48:00 +00:00
Boris Brezillon fbbe00c0b7 panfrost: Use an identity swizzle for RAW formats
When the render target format is raw, the swizzle is ignored. Let's
set it to identity to avoid misleading the pandecode reader into
thinking the swizzle is applied.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Suggested-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>
2021-09-28 18:59:46 +00:00
Boris Brezillon ce8ea9e602 pan/lower_fb: Add support for rgb10a2 _SINT variants
It's just a matter of taking the sign bit into account in the
pack/unpack routines.

Needed for panvk rgb10a2_sint blits.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>
2021-09-28 18:59:46 +00:00
Boris Brezillon 15f6cd7f72 pan/lower_fb: Add support for B10G10R10A2_UINT variants
The components are re-ordered before packing/unpacking, so nothing to
do here except adding the missing case in the switch statements.

Needed for panvk bgr10a2_uint blits.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>
2021-09-28 18:59:46 +00:00
Boris Brezillon 7625cba2b7 pan/lower_fb: Re-order components when dealing with raw formats
The output swizzle defined in the render-target descriptor is ignored
when the format is RAW. In that case, we have to swap the components
when lowering FB stores/loads if we want to get the right color.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>
2021-09-28 18:59:46 +00:00
Boris Brezillon a0867ef934 pan/lower_fb: Support SNORM8 unpacking
Needed for panvk blend lowering.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12793>
2021-09-28 18:59:46 +00:00
Boris Brezillon f256ec2a88 pan/bi: Fix 1DArray image coordinate retrieval
In NIR image instructions, the array index always follows the last
image coordinate, meaning that array index is in coord.y for 1D
arrays. But the current panfrost ABI wants it in coord.z regardless of
the image dimension.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13078>
2021-09-28 18:44:05 +00:00
Timur Kristóf d3e0cf3d32 aco: Omit p_extract after ds_read with matching bit size.
Fossil DB stats on Sienna Cichlid:

Totals from 135 (0.10% of 128647) affected shaders:
CodeSize: 525184 -> 523704 (-0.28%)
Instrs: 92835 -> 92684 (-0.16%)
Latency: 311528 -> 311055 (-0.15%)
InvThroughput: 86572 -> 86455 (-0.14%)
Copies: 7666 -> 7650 (-0.21%)

Fossil DB stats on Sienna Cichlid with NGGC on:

Totals from 58374 (45.38% of 128647) affected shaders:
CodeSize: 160322912 -> 159622564 (-0.44%)
Instrs: 30755822 -> 30639193 (-0.38%)
Latency: 136713768 -> 136690360 (-0.02%)
InvThroughput: 21739219 -> 21658151 (-0.37%)
Copies: 3297969 -> 3297953 (-0.00%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560>
2021-09-28 17:59:27 +00:00
Timur Kristóf 9478901824 aco: Implement integer conversions using p_extract.
Fossil DB stats on Sienna Cichlid:

Totals from 563 (0.44% of 128647) affected shaders:
SpillSGPRs: 1381 -> 1382 (+0.07%)
SpillVGPRs: 1606 -> 1552 (-3.36%)
CodeSize: 2474724 -> 2446612 (-1.14%); split: -1.15%, +0.02%
Scratch: 181248 -> 180224 (-0.56%)
Instrs: 440973 -> 435091 (-1.33%); split: -1.35%, +0.01%
Latency: 9123609 -> 8517830 (-6.64%); split: -6.66%, +0.02%
InvThroughput: 3685256 -> 3383293 (-8.19%); split: -8.22%, +0.02%
VClause: 8425 -> 8372 (-0.63%)
Copies: 66553 -> 66681 (+0.19%); split: -0.49%, +0.68%
Branches: 13824 -> 13825 (+0.01%); split: -0.01%, +0.01%
PreSGPRs: 21816 -> 21824 (+0.04%)

Fossil DB stats on Sienna Cichlid with NGGC on:

Totals from 58802 (45.71% of 128647) affected shaders:
SpillSGPRs: 6541 -> 6542 (+0.02%)
SpillVGPRs: 1606 -> 1552 (-3.36%)
CodeSize: 162976608 -> 162244340 (-0.45%); split: -0.45%, +0.00%
Scratch: 181248 -> 180224 (-0.56%)
Instrs: 31163521 -> 31098078 (-0.21%); split: -0.21%, +0.00%
Latency: 146893569 -> 144920070 (-1.34%); split: -1.34%, +0.00%
InvThroughput: 25384324 -> 25035940 (-1.37%); split: -1.38%, +0.00%
VClause: 552310 -> 552257 (-0.01%)
Copies: 3356856 -> 3356984 (+0.00%); split: -0.01%, +0.01%
Branches: 1237314 -> 1237315 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 2185339 -> 2185347 (+0.00%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560>
2021-09-28 17:59:27 +00:00
Timur Kristóf f14023666c aco: Allow p_extract to have different definition and operand sizes.
Makes p_extract more flexible and prepares it to be usable
for other use cases.

No Fossil DB changes.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11560>
2021-09-28 17:59:27 +00:00
Marek Olšák f00d3e2909 radeonsi: implement shader-based culling for lines
This helps some viewperf subtests.
Only view XY culling is done. Edgeflags are always disabled with lines.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
2021-09-28 17:30:06 +00:00
Marek Olšák e7e0b90c94 ac/llvm: rename ac_cull_triangle -> ac_cull_primitive
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
2021-09-28 17:30:06 +00:00
Marek Olšák 0030bdf9a6 radeonsi: add gfx10 helpers for determining whether edgeflags are enabled
They will return false when culling lines.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
2021-09-28 17:30:06 +00:00
Marek Olšák 6058b7381e radeonsi: always use the correct number of vertices in NGG shader code
This is always 3 now, but it will be 2 for lines.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
2021-09-28 17:30:06 +00:00
Marek Olšák 25026076ab ac/llvm: pass cull options into cull_bbox directly
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
2021-09-28 17:30:06 +00:00
Marek Olšák ccbd551192 radeonsi: disallow NGG fast launch on Navi1x because VGT_FLUSH makes it slower
This improves viewperf performance on Navi1x.

All Navi1x fast launch workarounds are removed and all fast launch
codepaths are disabled.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
2021-09-28 17:30:06 +00:00
Marek Olšák b1cf504f78 radeonsi: fix clearing index_size for NGG fast launch
Cc: 21.1 21.2 <mesa-stable@lists.freedesktop.org>

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13048>
2021-09-28 17:30:06 +00:00