Emma Anholt
2bd304bc8f
anv: Skip the RT flush when doing depth-only rendering.
...
The spec citation says it's just for when the RT write message BTI might
point to a different RT, and if we don't have any color attachments then
we won't have one of those at all.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21508 >
2023-02-27 21:44:56 +00:00
Mike Blumenkrantz
6992aa951d
aux/tc: only call tc_parse_draw() when parsing renderpass info
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21533 >
2023-02-27 21:04:56 +00:00
Mike Blumenkrantz
ad0d5a24aa
aux/tc: track whether queries have been terminated in a renderpass
...
on tilers it's important to know whether a query is ended mid-renderpass
so that the query begin can occur inside/outside of the renderpass
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21533 >
2023-02-27 21:04:56 +00:00
Caio Oliveira
91fa939763
panfrost: Use NIR scoped barriers instead of memory barriers
...
Now both GLSL and SPIR-V will produce the scoped barriers, so no
need to handle the old ones.
Control barriers are still present in some cases, so keep that
for now.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Caio Oliveira
901bc6d53c
pan/midgard: Handle nir_intrinsic_scoped_barrier in Midgard compiler
...
Behave the same as the existing more specific barrier intrinsics.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Caio Oliveira
64a0266260
pan/compiler: Fix handling of nir_intrinsic_scoped_barrier
...
Only emit anything if this is a control barrier, i.e. contains an
execution scope. Also change the assertion to look at that scope
instead of the memory scope.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Caio Oliveira
c80268a20d
intel/compiler: Mark various memory barriers intrinsics unreachable
...
Now that both SPIR-V and GLSL are using scoped barriers, we can stop
handling the specialized ones.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Caio Oliveira
fe908ffefa
glsl: Implement use_scoped_barrier option for lowering memory barriers
...
When the option is enabled, lower memory barriers to the
unified nir_intrinsic_scoped_barrier.
The translation of the following is based on
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_gl_spirv.txt
- memoryBarrier()
- memoryBarrierBuffer()
- memoryBarrierImage()
- memoryBarrierShared()
- groupMemoryBarrier()
Also use scoped barrier for the memory counterparts of the GLSL
(control) barrier() when the option is enabled. The execution
part of a (control) barrier() remains using the old intrinsic.
For memoryBarrierAtomicCounter() there's no corresponding
nir_var_atomic_counter mode. Since atomic counters are lowered
to SSBOs, use the nir_var_mem_ssbo mode in the scoped barrier
instead.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Acked-by: Rob Clark <robclark@freedesktop.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Caio Oliveira
2178a8da51
gallivm: Fix handling of nir_intrinsic_scoped_barrier
...
A scoped barrier only has a control barrier behavior if there's
an execution scope.
Fixes: 13d900de0d ("llvmpipe: set nir_shader_compiler_options::use_scoped_barrier")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Caio Oliveira
e411e0afd3
microsoft/compiler: Handle scoped barrier in Tess splitting
...
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Caio Oliveira
1db7e6a261
nir: Support use_scoped_barrier in nir_lower_atomics_to_ssbo
...
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Acked-by: Rob Clark <robclark@freedesktop.org >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3339 >
2023-02-27 20:24:01 +00:00
Rob Clark
e45bbcf649
Revert "freedreno: Account for multi-draw in num_draws"
...
autotune already divides draw-cost by # of draws, but only increments
the draw-cost once per multi-draw. We could either _also_ account for
draw-cost by multiply by # of draws for treat multi-draw as a single
draw. The latter saves an integer multiply per draw.
Fixes a performance regression triggered by transition from GMEM to
sysmem rendering.
This reverts commit 6bfee9e669 .
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21543 >
2023-02-27 18:30:09 +00:00
Emma Anholt
cc55a2e77d
ci/crocus: Mark unvanquished as flaky.
...
It's started rendering something different again, with a similar sort of
bad rendering to what's linked in the bug report (though this time it's a
'P' that became a white square). Commit range 65b62db0..964323fe has
nothing particularly likely in it, so I expect this is some sort of cache
flushing fail or something.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21565 >
2023-02-27 18:16:07 +00:00
Emma Anholt
eac875a78e
ci/crocus: Add new tess xfails and a link to the regression bug report.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21565 >
2023-02-27 18:16:07 +00:00
Samuel Pitoiset
ca2d2ea60b
zink/ci: skip one more test that timeout with RADV
...
It usually takes more than 60s to run.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21564 >
2023-02-27 18:23:38 +01:00
Karol Herbst
4fb0adc43c
ci/zink: move threading tests to flakes
...
We have some failed CI jobs where some of those tests randomly pass.
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21561 >
2023-02-27 17:05:20 +00:00
Ryan Neph
03ffbcb29a
Revert "venus: temporarily redirect VkDrmFormatModifierPropertiesListEXT to "2" variant"
...
No longer need to redirect, since the renderer should use the fixed
decoder for VkDrmFormatModifierPropertiesListEXT::drmFormatModifierCount
by now.
This reverts commit 525b8c582f .
Signed-off-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21395 >
2023-02-27 16:45:02 +00:00
Ryan Neph
1d12d7c33c
venus: update venus-protocol headers to fix WA1
...
Follow-up to previous commit, this time to fix encoding/decoding for
VkDrmFormatModifierPropertiesListEXT::drmFormatModifierCount. Fixes a
workaround (WA1) in the venus-protocol.
Signed-off-by: Ryan Neph <ryanneph@google.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21395 >
2023-02-27 16:45:02 +00:00
Alyssa Rosenzweig
4eabd6586b
nir/lower_blend: Don't dereference null
...
If a dual source blend colour is never written, src1 will be null and it will be
invalid to dereference it. src1 is dereferenced both for the f2fN instruction
but also if a dual blend factor is used... even if the latter isn't strictly
valid, segfaulting in the NIR pass seems a lot meaner than blending with zero.
The referenced commit hosed Asahi, causing anything that used blending to crash.
Panfrost is unaffected since it always supplies a dual colour due to our crude
construction of blend shaders.
Fixes: 8313016543 ("nir/lower_blend: Consume dual stores")
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21544 >
2023-02-27 15:47:33 +00:00
Rhys Perry
75d9a4a6ce
aco: always update orig_names in get_reg_phi()
...
No idea why this wasn't done if pc.first was a renamed temporary.
Fixes navi10 RA validation error with
dEQP-VK.binding_model.descriptor_buffer.multiple.graphics_geom_buffers1_sets3_imm_samplers
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8349
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21501 >
2023-02-27 15:10:22 +00:00
Eric Engestrom
735df516e9
radv: split linker script for android since it requires different symbols
...
Fixes: 4956f6d0bf ("radv: Add Android module info to linker script.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8338
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Acked-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21518 >
2023-02-27 14:34:16 +00:00
Yonggang Luo
669a68489d
meson: Use sse2_arg and sse2_args to replace usage of c and c_sse2_args
...
And now c_sse2_arg and c_sse2_args are remvoed
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21375 >
2023-02-27 13:50:11 +00:00
Mike Blumenkrantz
c1a62476ac
vulkan/wsi/x11: make 4 image minimum for xwayland driver-specific
...
this avoids adding extra frames of latency to drivers that don't need
it
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21447 >
2023-02-27 13:21:21 +00:00
Mike Blumenkrantz
7c8a5f6e37
vulkan/wsi: switch to using an options struct for last param
...
this makes adding values easier since the drivers won't need to be updated
Acked-by: Daniel Stone <daniels@collabora.com >
Reviewed-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21447 >
2023-02-27 13:21:21 +00:00
Georg Lehmann
1c5c2f77c3
aco: use and swizzle mask in dpp quad perm
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21412 >
2023-02-27 11:09:42 +00:00
Georg Lehmann
8fabde3be4
aco/gfx11: use dpp_row_xmask and dpp_row_share
...
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21412 >
2023-02-27 11:09:42 +00:00
Georg Lehmann
b7cd0eb439
aco: use v_permlane(x)16_b32 for masked swizzle
...
Should be cheaper than ds_swizzle.
Totals from 8 (0.01% of 134913) affected shaders:
CodeSize: 16316 -> 16388 (+0.44%)
Instrs: 3088 -> 3086 (-0.06%)
Latency: 49558 -> 49508 (-0.10%)
InvThroughput: 9180 -> 9198 (+0.20%)
Copies: 376 -> 384 (+2.13%)
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21412 >
2023-02-27 11:09:42 +00:00
Georg Lehmann
9f155c21c3
amd: d16 uses rtz conversion for 32bit float
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21404 >
2023-02-27 09:55:34 +00:00
Georg Lehmann
77252687fa
amd: don't use d16 for integer loads
...
D16 saturates to min/max instead of just truncating.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21404 >
2023-02-27 09:55:34 +00:00
Georg Lehmann
a00b50d820
nir: change 16bit image dest folding option to per type
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21404 >
2023-02-27 09:55:34 +00:00
Samuel Pitoiset
a14d46fde2
radv: enable primitiveUnderestimation on GFX9+
...
It's passing dEQP-VK.rasterization.conservative.underestimate.* on
NAVI21.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21459 >
2023-02-27 09:04:01 +00:00
Samuel Pitoiset
dba7a66429
radv: set MSAA_NUM_SAMPLES to 0 for underestimate rasterization
...
Based on PAL.
Fixes
dEQP-VK.rasterization.conservative.underestimate.samples_*.triangles.normal.test.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21459 >
2023-02-27 09:04:01 +00:00
Samuel Pitoiset
0eae617826
radv: stop setting ENABLE_POSTZ_OVERRASTERIZATION to 1
...
According to PAL this isn't set.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21459 >
2023-02-27 09:04:01 +00:00
Samuel Pitoiset
05732f4519
radv: cleanup radv_emit_{conservative,msaa}_state() functions
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21459 >
2023-02-27 09:04:01 +00:00
Mike Blumenkrantz
34e7c17cfe
lavapipe: EXT_image_sliced_view_of_3d
...
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21514 >
2023-02-27 07:49:48 +00:00
Lionel Landwerlin
66e3ccbcac
vulkan/runtime: store parameters of VK_EXT_sliced_view_of_3d
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21514 >
2023-02-27 07:49:48 +00:00
Tatsuyuki Ishi
ed03821442
radv/sqtt: Use code buffer from radv_shader directly instead of copying.
...
The reference-counted radv_shader always outlives the pipeline, so we can
use this buffer directly when dumping code objects to the trace.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21513 >
2023-02-27 07:16:48 +00:00
Tatsuyuki Ishi
ea070fb83a
radv: Keep shader code ptr in a separately allocated buffer.
...
RGP traces need a dump of shader code in order to display ISA and
instruction trace. Previously, this was read back from GPU at trace
creation time. However, for future changes that implements upload shader
to invisible VRAM, the upload destination will be a temporary staging
buffer and will be only accessible during shader creation.
To allow dumping in such cases, copy the shader code to a separate buffer
at creation time, if thread tracing is enabled.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21513 >
2023-02-27 07:16:48 +00:00
Mike Blumenkrantz
52f27cda05
zink: allow direct memory mapping for any COHERENT+CACHED buffer
...
some drivers may provide this in heaps that get used by non-staging resources,
so avoid extra copies in that case
unlike the previous attempt at this optimization, this utilizes the screen-based
context for thread-safe transfers, which should avoid races/crashes
fix #8171
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21452 >
2023-02-27 03:50:14 +00:00
Mike Blumenkrantz
d78de2a962
zink: add locking for zink_screen::copy_context and defer creation
...
the copy context isn't always used, so this allows its creation to
be deferred and potentially save a bunch of memory
also add locking for multi-context thread safety
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21452 >
2023-02-27 03:50:14 +00:00
Mike Blumenkrantz
a7b98dd4be
zink: avoid adding ubo/ssbo bindings multiple times for different bitsizes
...
these are valid variables, but the descriptor binding needs to be unique
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21522 >
2023-02-27 03:11:44 +00:00
Mike Blumenkrantz
db1af91f1b
zink: simplify/rework image typing in ntv
...
the array approach was broken if a shader contained both bindless
and non-bindless resources, whereas a hash table is simpler and can
handle both images and samplers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21522 >
2023-02-27 03:11:44 +00:00
Mike Blumenkrantz
ac5f72a023
zink: delete unused emit_image param in ntv
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21522 >
2023-02-27 03:11:44 +00:00
Mike Blumenkrantz
fb4fd03db9
zink: fix bindless texture barrier generation
...
whenever I redid barriers I forgot to handle bindless textures,
which meant they weren't getting barriers added
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21522 >
2023-02-27 03:11:44 +00:00
Mike Blumenkrantz
75e9ba85de
zink: rework descriptor unbind params to use is_compute directly
...
much simpler
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21522 >
2023-02-27 03:11:44 +00:00
Mike Blumenkrantz
ddb116d755
zink: fix shader read access removal for barrier generation
...
barrier access is based on total binds per gfx/compute, not per stage
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21522 >
2023-02-27 03:11:44 +00:00
Mike Blumenkrantz
00288d4f53
zink: delete dead uniform variables
...
this just obfuscate nir, so delete them now
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21522 >
2023-02-27 03:11:44 +00:00
Alyssa Rosenzweig
760f367386
agx: Lower sampler LOD bias
...
G13 does not support sampler descriptor LOD biasing, so this needs to be lowered
to shader code for APIs that require this functionality. Add an option to do
this lowering while doing our other backend texture lowerings. This generates
lod_bias_agx texture instructions which the driver is expected to lower
according to its binding model.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21276 >
2023-02-27 02:35:41 +00:00
Alyssa Rosenzweig
23f271833f
asahi: Lower lod_bias_agx to uniform registers
...
Track the LOD bias of samplers and upload them at draw time to uniform
registers. This could be optimized in the future.
Vulkan will probably want to pull from a descriptor set instead.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21276 >
2023-02-27 02:35:41 +00:00
Alyssa Rosenzweig
8058d31a25
nir: Add nir_texop_lod_bias_agx
...
Add a new texture opcode that returns the LOD bias of the sampler. This will be
used on AGX to lower sampler LOD bias to txb and friends. This needs to be a
texture op (and not a new intrinsic) to handle both bindless and bindful
samplers across GL and Vulkan in a uniform way.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21276 >
2023-02-27 02:35:41 +00:00