Hans-Kristian Arntzen
5266bb0211
Fix DGC bug where indirect count > maxSequencesCount.
...
Need to explicitly clamp the indirect count against maxSequencesCount,
or we risk writing bogus commands into spill region.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23252 >
2023-05-31 07:49:54 +00:00
Samuel Pitoiset
1947500208
aco: remove nir_intrinsic_load_barycentric_at_sample occurences
...
This is lowered earlier and shouldn't get there.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23307 >
2023-05-31 07:25:46 +00:00
Dave Airlie
54ceec8d9e
radv/meta: fix uninitialised stack memory usage.
...
==10199== Conditional jump or move depends on uninitialised value(s)
==10199== at 0xA107B13: radv_resume_queries (radv_meta.c:93)
==10199== by 0xA108097: radv_meta_restore (radv_meta.c:225)
==10199== Uninitialised value was created by a stack allocation
==10199== at 0xA1145B2: fill_buffer_shader (radv_meta_buffer.c:171)
saved_state is never memset, so the value should be inited.
Cc: mesa-stable
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23327 >
2023-05-31 06:52:46 +00:00
Alyssa Rosenzweig
4486009edb
radv/query: Use nir_trim_vector
...
With Coccinelle patch:
@@
expression b, V;
@@
-nir_vec2(b, nir_channel(b, V, 0), nir_channel(b, V, 1))
+nir_trim_vector(b, V, 2)
@@
expression b, V;
@@
-nir_vec3(b, nir_channel(b, V, 0), nir_channel(b, V, 1), nir_channel(b, V, 2))
+nir_trim_vector(b, V, 3)
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23259 >
2023-05-30 16:24:21 -04:00
Alyssa Rosenzweig
ebf4eff7eb
treewide: Use nir_replicate
...
Via coccinelle.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Acked-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23259 >
2023-05-30 16:24:21 -04:00
Hans-Kristian Arntzen
a3507f9d87
radv/amdgpu: Report 48-bit VAs in bo logs.
...
More ergonomic when correlating with page fault addresses.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23256 >
2023-05-30 17:17:58 +00:00
Chia-I Wu
063e2e8ed8
radv: fix gl_SampleMaskIn for sample shading
...
When sample shading, we need
gl_SampleMaskIn = SampleCoverage & (PsIterMask << gl_SampleID);
Add a new shader arg, ps_iter_mask, to pass PsIterMask to ps.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23265 >
2023-05-30 16:35:31 +00:00
Chia-I Wu
0bba0eb0df
ac, radeonsi: add and use ac_get_ps_iter_mask
...
It is more natural for ac_get_ps_iter_mask to take sample count.
Replace samplemask_log_ps_iter by ps_iter_smples in
ac_nir_lower_ps_options accordingly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23265 >
2023-05-30 16:35:30 +00:00
Chia-I Wu
750d641ca6
aco: fix alignment check in emit_load
...
align_offset already takes const_offset into consideration. Remove the
adjustment.
Fixes: 542733dbbf ("aco: add emit_load helper")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9097
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23242 >
2023-05-30 16:02:34 +00:00
Rhys Perry
94958e637d
aco: improve printing of s_delay_alu
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23213 >
2023-05-30 12:42:00 +00:00
Rhys Perry
54c0088629
aco: insert s_delay_alu on the linear CFG
...
fossil-db (gfx1100):
Totals from 10498 (7.87% of 133428) affected shaders:
Instrs: 22274711 -> 22277717 (+0.01%); split: -0.01%, +0.03%
CodeSize: 114557040 -> 114569064 (+0.01%); split: -0.01%, +0.02%
Latency: 236505186 -> 236497338 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 33425052 -> 33423876 (-0.00%); split: -0.00%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23213 >
2023-05-30 12:42:00 +00:00
Rhys Perry
d7f48a61ec
aco: use pass_flags to recover s_delay_alu cycles
...
This is simpler and more accurate.
fossil-db (gfx1100):
Totals from 11678 (8.75% of 133428) affected shaders:
Instrs: 25448655 -> 25436028 (-0.05%)
CodeSize: 130364728 -> 130314220 (-0.04%)
Latency: 325247603 -> 325231064 (-0.01%); split: -0.01%, +0.00%
InvThroughput: 45901166 -> 45900022 (-0.00%); split: -0.00%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23213 >
2023-05-30 12:42:00 +00:00
Rhys Perry
d9cdb3524a
aco: fix update_alu(clear=true) for exports
...
For:
v_mov_b32_e32 v0, 1.0
exp mrtz v0, off, off, off
we should completely remove the ALU entry before creating the EXP's WaR entry for v0.
Otherwise, the two will be combined into an entry which will wait for
expcnt(0) for later uses of v0.
gen_alu() should also be before gen(), since gen_alu() performs the clear
while gen() creates the WaR entry.
fossil-db (gfx1100):
Totals from 3589 (2.69% of 133428) affected shaders:
Instrs: 5591041 -> 5589047 (-0.04%); split: -0.04%, +0.00%
CodeSize: 28580840 -> 28572864 (-0.03%); split: -0.03%, +0.00%
Latency: 65427923 -> 65427543 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 11109079 -> 11109065 (-0.00%); split: -0.00%, +0.00%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23213 >
2023-05-30 12:42:00 +00:00
Dave Airlie
5deb476095
radv: align video images internal width/height inside the driver.
...
Due to how the decoders work, they will write garbage data into
the padding, and later using the image for sampling with linear
images will use the garbage to create broken results. Let the
user specify the image size and align it up in the driver, so
sampling of the image later has the correct w/h.
cc: mesa-stable
Reviewed-by: Lynne <dev@lynne.ee >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
b9d208bd1f
radv/video: fix physical device format property count.
...
This was returning bad values
Fixes: db62c38091 ("radv: add vcn h265 decode.")
Reviewed-by: Lynne <dev@lynne.ee >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
1a2a330483
radv/video: add debug flag to enable dpb image array on newer GPUs.
...
This is useful to test the paths on newer GPUs that work on older GPUs.
Reviewed-by: Lynne <dev@lynne.ee >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
04c28c9fba
radv/video: fix some whitespace.
...
this just removes some TABs.
Reviewed-by: Lynne <dev@lynne.ee >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
e2fa6ec73b
radv/video: rework stream handle generation.
...
This shouldn't change anything, except move some calcs to an
earlier spot to avoid redoing them
Reviewed-by: Lynne <dev@lynne.ee >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
cf1bd0f364
radv/video: add missing offset to the dpb binding.
...
This doesn't affect anything I've seen yet.
Fixes: 3e2c768aa8 ("radv/vcn: enable dynamic dpb tier 2 for h264/h265 on navi21+")
Reviewed-by: Lynne <dev@lynne.ee >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Dave Airlie
b5963fc1f0
radv/video: fix h264/265 dpb usage.
...
This seems to be the best compromise I can come up with so far.
I can't figure out to get the tier2 programming to match between
264 and 265, maybe they are just programmed different here, good
old firmware.
Fixes: 1693c03a39 ("radv/video: add initial h264 decoder for VCN")
Reviewed-by: Lynne <dev@lynne.ee >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23227 >
2023-05-30 02:53:32 +00:00
Konstantin Seurer
03a9715a68
amd: Use the Mesa base style
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Eric Engestrom <eric@engestrom.ch >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23275 >
2023-05-29 21:06:12 +00:00
David Heidelberg
c9288808db
ci/amd: previously missed raven flake
...
Fixes: 1fa1c285fc ("ci/amd: add draw.dynamic_rendering flake")
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23300 >
2023-05-29 22:01:29 +02:00
Samuel Pitoiset
3808aab239
radv: advertise VK_EXT_dynamic_rendering_unused_attachments
...
It's a no-op and it's passing CTS.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23292 >
2023-05-29 13:41:02 +00:00
Samuel Pitoiset
efc807aac4
radv/ci: skip tests that timeout since Vulkan loader 1.3
...
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23261 >
2023-05-29 08:46:04 +00:00
Samuel Pitoiset
bf9699a768
radv/ci: update list of expected failures since Vulkan loader 1.3
...
Updating Debian to 12 also updated Vulkan loader 1.3 and these are
fixed now.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23261 >
2023-05-29 08:46:04 +00:00
Samuel Pitoiset
55df7b6415
radv: rework configuring VGT_SHADER_STAGES_EN
...
For shader objects.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22991 >
2023-05-29 07:27:11 +00:00
Tatsuyuki Ishi
978d80fbe2
radv: Make shader related destruction happen before hw_ctx.
...
radv_destroy_shader_upload_queue waits for a semaphore, which will in turn
call query_reset_status on hw_ctx that will fail due to being already
destroyed.
Fix radv/amdgpu: amdgpu_cs_query_reset_state2 failed. (-9) spam in the logs
with RADV_PERFTEST=dmashaders.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23276 >
2023-05-29 06:53:05 +00:00
Samuel Pitoiset
01bd012edd
amd: fix 64-bit integer color image clears
...
Fixes recent CTS dEQP-VK.api.image_clearing.*r64* since the Vulkan
specification has been clarified.
Only VK_FORMAT_R64_{UINT,SINT} are supported.
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23250 >
2023-05-29 07:54:38 +02:00
Marek Olšák
038fb6573a
radeonsi: remove the gl_SampleMask FS output if MSAA is disabled
...
It's better to remove the output than what the previous code did,
which only unset MASK_EXPORT_ENABLE.
Reviewed-by: Qiang Yu <yuq825@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216 >
2023-05-26 23:27:59 -04:00
Marek Olšák
2f6665efc5
ac/llvm: use LLVM 0/1 constants from ac_llvm_context instead of LLVMConstInt
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216 >
2023-05-26 23:27:59 -04:00
Marek Olšák
39da12b7c7
ac/llvm: clean up visit_load_local_invocation_index and visit_load_subgroup_id
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216 >
2023-05-26 23:27:59 -04:00
Marek Olšák
1dd2fa01c7
ac/llvm: clean up translation of nir_intrinsic_load_invocation_id
...
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216 >
2023-05-26 23:27:59 -04:00
Marek Olšák
ea7c89d1f5
ac/surface: move determing ADDR_FMT_* into a helper function
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216 >
2023-05-26 23:27:59 -04:00
Marek Olšák
78d5626d17
ac/surface: move CB format translation helpers here
...
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216 >
2023-05-26 23:27:50 -04:00
Marek Olšák
8642740aef
ac/gpu_info: give has_msaa_sample_loc_bug a more accurate name
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23216 >
2023-05-26 23:17:40 -04:00
Jesse Natalie
cc136cacfa
radv: Don't run opt_remove_phis before lower_returns
...
nir_lower_returns will run nir_opt_remove_phis as part of its work
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22913 >
2023-05-26 18:31:30 +00:00
Eric Engestrom
6801de5170
ci/amd: only define AMDGPU_GPU_ID for the duration of the call
...
This avoids the risk of accidentally forgetting to overwrite it again in
a later call.
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23249 >
2023-05-26 09:34:53 +00:00
Eric Engestrom
0a33701558
ci/amd: move AMD-specific LD_PRELOAD to AMD config
...
Signed-off-by: Eric Engestrom <eric@igalia.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23249 >
2023-05-26 09:34:53 +00:00
Samuel Pitoiset
d2d07a7262
radv: fix copying 2D to 3D images
...
CTS is testing 2D to 3D image copies but the checks are incomplete and
we used to only copy the first slice.
This should fix
dEQP-GLES31.functional.copy_image.non_compressed.*.texture2d_array_to_texture3d
with ANGLE.
Cc: mesa-stable
Suggested-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23231 >
2023-05-26 08:41:31 +00:00
Rohan Garg
c2d0662eb8
ac/surface: make sure alignment is a POT
...
Signed-off-by: Rohan Garg <rohan@garg.io >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20153 >
2023-05-25 21:24:45 +00:00
Konstantin Seurer
2fbf13085a
radv: Stop using radv_get_int_debug_option
...
We can use debug_get_num_option instead. Bool options are changed to use
debug_get_bool_option.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23146 >
2023-05-25 19:58:38 +00:00
Rhys Perry
c9cfe7bc80
aco/tests: add fix_derivs_in_divergent_cf tests
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22636 >
2023-05-25 16:29:16 +00:00
Rhys Perry
02b933981c
aco/tests: improve performance of declaration parsing
...
Unlike \S, \w only matches characters which are valid in identifiers. This
seems to be much faster, especially for longer identifier names.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22636 >
2023-05-25 16:29:16 +00:00
Rhys Perry
859e059aa9
radv: use fix_derivs_in_divergent_cf
...
fossil-db (navi21):
Totals from 3256 (2.40% of 135636) affected shaders:
MaxWaves: 65430 -> 64366 (-1.63%)
Instrs: 3517336 -> 3517724 (+0.01%); split: -0.12%, +0.13%
CodeSize: 18963788 -> 18946904 (-0.09%); split: -0.14%, +0.05%
VGPRs: 172464 -> 175872 (+1.98%); split: -0.02%, +2.00%
Latency: 33643792 -> 33643179 (-0.00%); split: -0.12%, +0.12%
InvThroughput: 5912965 -> 5934404 (+0.36%); split: -0.09%, +0.46%
VClause: 60268 -> 60275 (+0.01%); split: -0.12%, +0.13%
SClause: 125227 -> 125241 (+0.01%); split: -0.09%, +0.10%
Copies: 253452 -> 254638 (+0.47%); split: -1.29%, +1.76%
Branches: 100951 -> 100953 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 186403 -> 185641 (-0.41%)
PreVGPRs: 153751 -> 156915 (+2.06%); split: -0.06%, +2.12%
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22636 >
2023-05-25 16:29:16 +00:00
Rhys Perry
364ad2815b
aco: implement texture samples with strict WQM coordinates
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22636 >
2023-05-25 16:29:16 +00:00
Rhys Perry
2447156b3c
aco: implement strict_wqm_coord_amd
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22636 >
2023-05-25 16:29:16 +00:00
Rhys Perry
35c133a77b
aco: add MIMG_instruction::strict_wqm
...
This lets us use linear VGPRs for part of the texture sample's address.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22636 >
2023-05-25 16:29:16 +00:00
Rhys Perry
1a6a57ac96
aco: let p_start_linear_vgpr take an operand
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22636 >
2023-05-25 16:29:16 +00:00
Rhys Perry
ab885a011a
aco: remove unused RegType
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22636 >
2023-05-25 16:29:16 +00:00
Rhys Perry
0d26d9d9b6
ac/nir: add fix_derivs_in_divergent_cf
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22636 >
2023-05-25 16:29:16 +00:00