Samuel Pitoiset
e99c66ad19
radv: add support for VkMemoryBarrier2KHR
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13549 >
2021-11-26 13:41:22 +00:00
Samuel Pitoiset
3da7d10d9b
radv: implement vkQueueSubmit2KHR()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13549 >
2021-11-26 13:41:22 +00:00
Samuel Pitoiset
8df17163c7
radv: implement vkCmdWaitEvents2KHR()/vkCmdPipelineBarrier2KHR()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13549 >
2021-11-26 13:41:22 +00:00
Samuel Pitoiset
57575974fd
radv: implement vkCmdWriteBufferMarker2AMD()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13549 >
2021-11-26 13:41:22 +00:00
Samuel Pitoiset
cff81c863b
radv: implement vkCmd{Reset,Set}Event2KHR()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13549 >
2021-11-26 13:41:22 +00:00
Samuel Pitoiset
a0ac03676f
radv: implement vkCmdWriteTimestamp2KHR()
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13549 >
2021-11-26 13:41:22 +00:00
Marek Olšák
1df7c0ce7e
radeonsi: print the shader stage for shader-db dumps
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13869 >
2021-11-26 11:58:27 +00:00
Marek Olšák
59926f25fa
radeonsi: print source_sha1 as part of shader dumps
...
It's not part of the shader key, but I don't know where else to put it.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13869 >
2021-11-26 11:58:27 +00:00
Marek Olšák
e54264c84f
nir: add shader_info::source_sha1, its initialization and printing
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13869 >
2021-11-26 11:58:27 +00:00
Marek Olšák
ba8075031a
util: add SHA1 printing and comparison functions
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13869 >
2021-11-26 11:58:27 +00:00
Marek Olšák
0b196b40a3
mesa: don't compute the same SHA1 twice in glShaderSource
...
We can just use original_sha1.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13869 >
2021-11-26 11:58:27 +00:00
Marek Olšák
67f01e02d9
mesa: add gl_linked_shader::linked_source_sha1
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13869 >
2021-11-26 11:58:27 +00:00
Marek Olšák
4364449677
mesa: add shader source SHA1s that are propagated up to glCompileShader
...
glCompileShader can use two different sources, so we need 2 different SHA1s
there. Successful compilation sets compiled_source_sha1.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13869 >
2021-11-26 11:58:27 +00:00
Marek Olšák
d473b31fe7
mesa: rename gl_shader::sha1 to disk_cache_sha1
...
there will be more sha1s
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13869 >
2021-11-26 11:58:27 +00:00
Marek Olšák
0bb580754c
mesa: remove SourceChecksum from shader structures
...
it will be replaced by sha1.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13869 >
2021-11-26 11:58:27 +00:00
Marek Olšák
cd86f1dc2b
radeonsi: rename si_get_shader_wave_size and make it non-inline
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13878 >
2021-11-26 11:35:05 +00:00
Marek Olšák
676d4ddcf8
radeonsi: centralize wave size computation in si_get_shader_wave_size
...
The big comment was not really true.
The other debug options are unused right now, but will be used again
in the future.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13878 >
2021-11-26 11:35:05 +00:00
Marek Olšák
b5665bd46c
radeonsi: don't use compute_wave_size directly
...
It will be removed.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13878 >
2021-11-26 11:35:05 +00:00
Marek Olšák
1ef027851d
radeonsi: propagate si_shader::wave_size to VGT_SHADER_STAGES
...
instead of hardcoding them
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13878 >
2021-11-26 11:35:05 +00:00
Marek Olšák
913e1b9138
radeonsi: clean up compute_wave_size use in si_compute_blit.c
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13878 >
2021-11-26 11:35:05 +00:00
Marek Olšák
8290cae2b7
radeonsi: don't use si_get_wave_size in si_get_ir_cache_key
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13878 >
2021-11-26 11:35:05 +00:00
Marek Olšák
d08b09cb7e
radeonsi: use si_shader::wave_size
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13878 >
2021-11-26 11:35:05 +00:00
Marek Olšák
bc57488936
radeonsi: add si_shader::wave_size because it will vary
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13878 >
2021-11-26 11:35:05 +00:00
Marek Olšák
41523773f5
radeonsi: add wave32 flag into prolog/epilog keys
...
It will vary between shaders.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13878 >
2021-11-26 11:35:05 +00:00
Marek Olšák
3b2a6e1b21
radeonsi: don't print uninitialized inlined_uniform_values
...
We don't set them and we don't read them if they are disabled, so don't
print them either. This silences valgrind warnings.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13878 >
2021-11-26 11:35:05 +00:00
Marek Olšák
94dd401287
driconf: enable glthread for Basemark GPU
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13947 >
2021-11-26 10:54:49 +00:00
Marek Olšák
5a970dbac3
driconf: enable glthread for Minecraft
...
+30% performance
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13947 >
2021-11-26 10:54:49 +00:00
Marek Olšák
9c4d92508d
driconf: enable glthread for all Unigine benchmarks
...
It helps.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13947 >
2021-11-26 10:54:49 +00:00
Samuel Pitoiset
add883bf9b
aco: fix right shift of exponent 32 detected by UBSAN
...
src/amd/compiler/aco_optimizer.cpp:1316:17: runtime error: shift
exponent 32 is too large for 32-bit type 'unsigned int'
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13951 >
2021-11-25 16:15:30 +00:00
Samuel Pitoiset
d18720897f
radv: fix OOB access for inline push constants detected by UBSAN
...
src/amd/vulkan/radv_cmd_buffer.c:3232:75: runtime error: index 252 out
of bounds for type 'uint8_t [128]'
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13951 >
2021-11-25 16:15:30 +00:00
Samuel Pitoiset
8e3fbe7cc8
ac/nir: fix left shift of 1 by 31 places detected by UBSAN
...
src/amd/common/ac_nir_lower_ngg.c:1135:62: runtime error: left shift
of 1 by 31 places cannot be represented in type 'int
src/amd/common/ac_nir_lower_ngg.c:622:20: runtime error: left shift
of 1 by 31 places cannot be represented in type 'int'
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13951 >
2021-11-25 16:15:30 +00:00
Marius Hillenbrand
a46d155329
util/cpu_detect, gallium: use cpu_family CPU_S390X instead of separate flag
...
to also get rid of the additional function that I introduced before.
Fixes: 82b261417e
("util/cpu_detect: Add flag for IBM Z (s390x)")
Signed-off-by: Marius Hillenbrand <mhillen@linux.ibm.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13958 >
2021-11-25 12:57:20 +00:00
Danylo Piliaiev
a78c36ecc6
ir3/cp: Prevent setting an address on subgroup macros
...
These macros expand to a mov in an if statement which breaks address
assumption that instruction which produces address and consumes it
are in the same block.
Fixes test:
dEQP-VK.subgroups.ballot_broadcast.framebuffer.subgroupbroadcast_intvertex
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13931 >
2021-11-25 12:18:48 +00:00
Marek Olšák
d14c09f7f6
mesa: add a more straightforward callback for replacing shaders
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13946 >
2021-11-25 10:39:30 +00:00
Connor Abbott
969369e962
ir3/lower_subgroups: Fix potential infinite loop
...
I was trying to be clever here, skipping ahead to the newly-created
block and processing the remaining instructions after the split in the
same loop. But if the last instruction in a block was lowered, the saved
next instruction would be the head of the block before the split, not
the new block, and we would compare it to the new block so we wouldn't
stop like we were supposed to. Stop being so clever, and just restart
processing with the new block after lowering an instruction.
Because we're wrapping the actual transform in yet another loop, and the
restarting logic is a bit tricky, refactor the actual lowering into a
separate lower_instr function. Otherwise we'd be mixing the two and
indenting the actual logic even more.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13928 >
2021-11-25 10:16:48 +00:00
Dylan Baker
fc8e789b21
docs/release-calendar: remove additional 21.2 releases
...
21.3 is here, and will be releasing the .1 release before any of the
additional 21.2 releases would be made anyway.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13950 >
2021-11-24 21:25:02 -08:00
Dylan Baker
ed8bac5eb3
docs: update calendar and link releases notes for 21.2.6
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13950 >
2021-11-24 21:24:37 -08:00
Dylan Baker
6d37d741a4
docs: add sha256 sums for 21.2.6 relnotes
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13950 >
2021-11-24 21:24:15 -08:00
Dylan Baker
0481c17c6c
docs: add release notes for 21.2.6
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13950 >
2021-11-24 21:24:13 -08:00
Alejandro Piñeiro
f8009d3db2
meson: bump meson requirement to 0.53.0
...
Needed to avoid the following error:
meson.build:936:0: ERROR: Tried to access unknown option "cpp_rtti"
Fixes: ad86267412
("meson: Don't override built-in cpp_rtti option, error if it's invalid")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Reviewed-by: Dylan Baker <dylan@pnwbakers.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13905 >
2021-11-24 21:45:37 +00:00
Bas Nieuwenhuizen
cf6a14de0c
radv: Set RB+ registers correctly without framebuffer.
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13699 >
2021-11-24 18:22:10 +00:00
Bas Nieuwenhuizen
5632359959
radv: Remove the skipping of framebuffer emission if we don't have a framebuffer.
...
This was plain broken. The solution is to not require any framebuffer
changes. Silently skipping results in broken behavior. e.g:
(secondary cmdbuffer with no framebuffer)
ClearAttachment 2
translated into
bind attachment 2 as attachment 0 (skipped)
clear attachment 0
restore original bindings (skipped)
which results in clearing attachment 0, not what we wanted. It is
a small wonder CTS doesn't find it until VK_KHR_dynamic_rendering.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13699 >
2021-11-24 18:22:10 +00:00
Bas Nieuwenhuizen
728590403e
radv: Stop using a subpass for color clears.
...
They might not be available in secondary cmdbuffers with inheritance.
To avoid binding anything we need to create pipelines per attachment
index. I've excluded these from the "compile on device creation" set
because I think almost nobody will need them.
Alternative solution would be to reuse the same shader but muck with
a bunch of registers to shift them for the attachment index. That is
however a lot of complexity and has to execute on every pipeline
change, which is probably more expensive in overhead and definitely
in complexity.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13699 >
2021-11-24 18:22:10 +00:00
Bas Nieuwenhuizen
fcd2e69f7d
radv: Avoid using a new subpass for ds clears.
...
If we have an inherited subpass in a cmdbuffer we can't really
emit any framebuffer data if it isn't provided.
Note we still do it for resolve clears, but we can't have that
in a secondary cmdbuffer with inherited renderpass.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13699 >
2021-11-24 18:22:10 +00:00
Lionel Landwerlin
14e45cb21e
util/u_trace: refcount payloads
...
When cloning a chunk of tracepoints, we cannot just copy the elements
of the traces[] array. We also need the payloads associated with
those.
This change introduces a new u_trace_payloaf_buf object that is
refcounted so that we can easily import traces[] elements and their
payloads from one utrace to another.
v2: use u_vector (Danylo)
v3: Delete outdate comment (Danylo)
Fix assert (Danylo)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 0565c993f9
("u_trace: helpers for tracing tiling GPUs and re-usable VK cmdbuffers")
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13899 >
2021-11-24 17:53:08 +00:00
Lionel Landwerlin
87888c0b3f
anv: fix execbuf syncobjs/syncobj_values array leak
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Fixes: 36ea90a361
("anv: Convert to the common sync and submit framework")
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13945 >
2021-11-24 17:29:46 +00:00
Rhys Perry
34510ce3cc
nir/lower_subgroups: fix left shift of -1
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5365
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12901 >
2021-11-24 16:45:05 +00:00
Rhys Perry
811a7a2d31
nir/lower_tex: don't calculate texture_mask for texture_index>=32
...
With Vulkan, texture_index can be 32 or larger, which creates a shift
exponent larger than 31 (undefined behaviour). Since we don't use
texture_mask with Vulkan, just initialize it to 0.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5365
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12901 >
2021-11-24 16:45:04 +00:00
Rhys Perry
26d2e22eea
radv: stop running copy-propagation before nir_opt_deref
...
spirv_to_nir() now does this.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13924 >
2021-11-24 15:43:51 +00:00
Rhys Perry
b425100781
spirv: run nir_copy_prop before nir_rematerialize_derefs_in_use_blocks_impl
...
spirv_to_nir sometimes wraps derefs in vec2 or mov instructions as part of
its texture handling. These get in the way of
nir_rematerialize_derefs_in_use_blocks_impl. Running copy propagation
should get rid of the extra move instructions and get us back to intact
deref chains for everything except variable pointer use-cases.
fossil-db (Sienna Cichlid):
Totals from 6 (0.00% of 134572) affected shaders:
CodeSize: 92656 -> 93088 (+0.47%)
Instrs: 17060 -> 17138 (+0.46%)
Latency: 224408 -> 227539 (+1.40%)
InvThroughput: 37402 -> 37924 (+1.40%)
VClause: 408 -> 402 (-1.47%)
Copies: 1065 -> 1107 (+3.94%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net >
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5668
Fixes: 14a12b771d
("spirv: Rework our handling of images and samplers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13924 >
2021-11-24 15:43:51 +00:00