Christian Gmeiner
11ffb20b70
etnaviv: Update headers from rnndb
...
Update to rnndb commit 071f5a60dcb8.
This updates VIVS_PA_SHADER_ATTRIBUTES__LEN define from 10 to 16 and
fixes memory corruption if more then 10 varyings are used. The current
upper limit for varyings is 16.
Cc: mesa-stable
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com >
Reviewed-by: Lucas Stach <l.stach@pengutronix.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26662 >
2023-12-13 12:56:47 +00:00
Karol Herbst
de3190d36d
radeonsi: fix reg_saved_mask for non graphics contexts
...
The old code used to clear the bits, the new one set it. It should have
used `BITSET_CLEAR_RANGE` instead.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10286
Fixes: 17e01a9a9b ("radeonsi: merge context_reg_saved_mask and other_reg_saved_mask into a BITSET")
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com >
Tested-by: Michel Dänzer <mdaenzer@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26657 >
2023-12-13 12:25:38 +00:00
Tatsuyuki Ishi
c3c3a8926a
radv/amdgpu: Separate the concept of residency from use_global_list.
...
A BO can be always resident by two ways:
1. Through kernel bookkeeping. The BO is created with
AMDGPU_GEM_CREATE_VM_ALWAYS_VALID and bo->is_local gets set to true.
2. Through the driver global BO list. On every submission, the global
BO list is added to the CS's BO list.
Until now, use_global_list reflected either 1. or 2. . This commit
changes it to reflect 2. only, and update callsites that checks for
residency to use a new helper.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26591 >
2023-12-13 12:03:20 +00:00
Tatsuyuki Ishi
63120a55b8
radv/amdgpu: Remove virtual bo dump logic.
...
Virtual BOs cannot go into the global bo list. Accessing bo_handle is
also invalid for virtual BOs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26592 >
2023-12-13 11:42:35 +00:00
Rohan Garg
40c6e54ce7
anv: rename anv_create_companion_rcs_command_buffer to anv_cmd_buffer_ensure_rcs_companion
...
We can now drop any checks for companion_rcs_cmd_buffer before calling
anv_create_companion_rcs_command_buffer.
Ensure that anv_cmd_buffer_ensure_rcs_companion callee's have the proper
error handling.
Signed-off-by: Rohan Garg <rohan.garg@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26648 >
2023-12-13 11:19:07 +00:00
Timothy Arceri
bed1b8b90d
radeonsi: fix divide by zero in si_get_small_prim_cull_info()
...
This fixes a crash on startup with the game
"Ty the Tasmanian Tiger 3"
Fixes: f8a0aa6852 ("radeonsi: fix view culling for wide lines")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26661 >
2023-12-13 10:06:41 +00:00
Lionel Landwerlin
d376d8c5ea
anv: promote EXT_calibrated_timestamps to KHR
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26632 >
2023-12-13 09:39:08 +00:00
Lionel Landwerlin
4eb1eb0db1
anv: promote EXT_vertex_attribute_divisor to KHR
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26632 >
2023-12-13 09:39:08 +00:00
Lionel Landwerlin
f99e43d606
anv: switch to use runtime physical device properties infrastructure
...
Prevents us to have that big switch case for each extension's
properties.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26632 >
2023-12-13 09:39:08 +00:00
Lionel Landwerlin
dc858202a9
anv: get features after initializing drm
...
We'll want to capture properties like features, just once at
initialization.
In order to do this we need the DRM stuff to be initialized as some of
that can be reported in properties.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26632 >
2023-12-13 09:39:08 +00:00
Lionel Landwerlin
a1dcf943ab
isl: constify isl_device_get_sample_counts()
...
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Ivan Briano <ivan.briano@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26632 >
2023-12-13 09:39:08 +00:00
Tapani Pälli
2336058bbb
iris: use slow clear for small surfaces with Wa_18020603990
...
Described in Wa_18020603990, we need to use slow clear or add an
partial resolve after fast clear for surfaces where bpp <= 32 and
dim <= 256x256.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26629 >
2023-12-13 09:12:19 +00:00
Tapani Pälli
25a32433b1
anv: use slow clear for small surfaces with Wa_18020603990
...
Described in Wa_18020603990, we need to use slow clear or add an
partial resolve after fast clear for surfaces where bpp <= 32 and
dim <= 256x256.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26629 >
2023-12-13 09:12:19 +00:00
Samuel Pitoiset
ca8d9f850b
radv/ci: remove dEQP-VK.mesh_shader.ext.query.* from the lists
...
meshShaderQueries has been recently disabled because it causes random
GPU hangs in CI, I'm still investigating it. But let's clean the CI
lists to avoid any confusion, I will re-introduce them if needed but
this issue can also be reproduced without mesh shaders.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26651 >
2023-12-13 08:33:24 +00:00
Samuel Pitoiset
f576ce3340
radv: advertise VK_KHR_vertex_attribute_divisor
...
This is a promotion from the EXT, except the new property
supportsNonZeroFirstInstance which should already be supported.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26595 >
2023-12-13 08:08:21 +00:00
Samuel Pitoiset
24c755316b
vulkan/runtime: promote VK_EXT_vertex_attribute_divisor to KHR
...
Just rename existing structs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26595 >
2023-12-13 08:08:21 +00:00
Samuel Pitoiset
0605631094
radv: stop clearing FMASK_COMPRESS_1FRAG_ONLY for TC-compat CMASK images
...
TC-compat CMASK means Fmask decompression isn't needed because the hw
can read it directly from shaders, so this shouldn't have any effects.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26575 >
2023-12-13 07:48:51 +00:00
Samuel Pitoiset
c70c269b16
radv: remove useless check for TC-compat CMASK images during fb emission
...
The FMASK decompression only happens for images with FMASK and without
TC-compat CMASK, so both can never be TRUE.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26575 >
2023-12-13 07:48:51 +00:00
Iago Toral Quiroga
205938cd39
v3dv: disallow image stores on VK_KHR_DISPLAY surfaces
...
Display surfaces must be linear and V3D can only do linear TMU access
for 1D images. This would also restrict sampling usages, however, we
can currently work around those in the driver at a performance penalty.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10268
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26647 >
2023-12-13 06:17:15 +00:00
Faith Ekstrand
f6437f4388
nvk: Implement VK_EXT_multi_draw
...
Zink uses this to let it skip a bunch of the per-draw validation and, in
the case of NVK, redundant root descriptor uploads.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9642
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26660 >
2023-12-13 03:18:04 +00:00
Thomas H.P. Andersen
afbaeee358
nvk: VK_EXT_color_write_enable
...
A write mask based on the pipeline creation input is stored in scratch. Another
similar mask is also stored for the dynamic color_write_enable. These can then
be updated individually, and will be combined in MME macro before use.
Each attachment has a mask for rgba. The max number of attachments in 8 so
we can fit the write mask in a single 32bit scratch.
color_write_enable is a single bit per attachment. To make it easier to combine
in with the write mask it is stored in scratch with a separate rgba bits.
The layout of the both scratch values are:
Attachment index 88887777666655554444333322221111
Component abgrabgrabgrabgrabgrabgrabgrabgr
dEQP-VK.pipeline.monolithic.color_write_enable.*
Test run totals:
Passed: 576/576 (100.0%)
Failed: 0/576 (0.0%)
Not supported: 0/576 (0.0%)
Warnings: 0/576 (0.0%)
Waived: 0/576 (0.0%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26211 >
2023-12-13 00:48:54 +00:00
Alyssa Rosenzweig
f217d267d3
gallium: add PIPE_IMAGE_ACCESS_DRIVER_INTERNAL
...
for e.g. driver internal blits that can use special paths wrt comporession.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26613 >
2023-12-12 19:44:41 -04:00
Alyssa Rosenzweig
15b5437f8f
gallium: fix util_clamp_color type confusion
...
fixes arb_color_buffer_float-clear GL_RGBA8_SNORM.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Acked-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26613 >
2023-12-12 19:44:35 -04:00
Karol Herbst
d136583c82
rusticl/kernel: explicitly set rounding modes
...
Since dbbf566588 ("aco,ac/llvm,radeonsi: lower f2f16 to f2f16_rtz in nir")
radeonsi behavior changed and some of the core fp16 ops broke as a result.
We should explicitly specify the rounding mode until we add an gallium API
for drivers to advertize what they prefer.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26655 >
2023-12-12 23:02:11 +00:00
David Heidelberg
53b01459fd
rusticl: add freedreno alias for RUSTICL_ENABLE
...
`RUSTICL_ENABLE=msm` isn't first thought usually,
let's support the `freedreno` alias.
Suggested-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Karol Herbst <kherbst@redhat.com >
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26642 >
2023-12-12 21:56:59 +00:00
Friedrich Vock
f1817ab7e0
radv,vtn,driconf: Add and use radv_rt_ssbo_non_uniform workaround for Crysis 2/3 Remastered
...
Crysis 2 and 3 Remastered's RT shaders non-uniformly index into SSBO
descriptor arrays without specifying the NonUniformEXT qualifier on the
relevant access chains/load ops. This leads to artifacts around objects.
To add insult to injury, the game fails to provide a meaningful
applicationName/engineName in the Vulkan part of the DX11-Vulkan interop
solution used for RT. Both of these fields are set to "nvpro-sample"
(perhaps the code has been copied from NVIDIA's sample applications).
Therefore, fall back to executable name matching.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9883
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26391 >
2023-12-12 21:16:39 +00:00
Faith Ekstrand
63e2bba592
nak: Don't set both FTZ and DNZ at the same time
...
Fixes: 3955e596df ("nak: Implement fmulz and ffmaz")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26654 >
2023-12-12 20:29:53 +00:00
Rhys Perry
dcbf31dce2
vulkan/wsi: always create command buffer for special blit queues
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com >
Fixes: d7938de8fe ("vulkan/wsi: don't support present with queues where blit is unsupported")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10283
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26635 >
2023-12-12 20:02:43 +00:00
Caio Oliveira
a8b2426419
intel/compiler: Use reference instead of pointer for fs_visitor
...
Per Ian suggestion. Also clear up a few unnecessary casts around the code and
use `s` for fs_visitor ("shader"). Note to include a reference in ntf we need
to set it during initialization, so create an explicit mem_ctx for it.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:14 +00:00
Caio Oliveira
77ab74ccc2
intel/compiler: Use reference instead of pointer for nir_to_brw_state
...
Per Ian suggestion.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:14 +00:00
Caio Oliveira
4e5fcccd01
intel/compiler: Create and use nir_to_brw() function
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:14 +00:00
Caio Oliveira
38a42e5aa1
intel/compiler: Add ctor to fs_builder that just takes the shader
...
Uses the dispatch_width from the shader (fs_visitor). This was not
possible before because the dispatch_width was not part of
backend_shader.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:14 +00:00
Caio Oliveira
cf730adc58
intel/compiler: Make fs_builder include fs_visitor and not the other way
...
This will allow fs_builder have a reference to an fs_visitor (a
"fs_shader" really), instead of a reference to a backend_shader.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:14 +00:00
Caio Oliveira
f5032c4d52
intel/compiler: Make fs_visitor not depend on fs_builder
...
At this point this is more a header dependency due to inline functions,
so shuffle them around. The end goal is to allow fs_builder have a
reference to a fs_visitor (really a fs_shader).
Note the header is still included, a later patch will move the includes
to the call-sites.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:14 +00:00
Caio Oliveira
4f991dec00
intel/compiler: Remove fs_visitor::bld
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:14 +00:00
Caio Oliveira
5b8ec015f2
intel/compiler: Don't use fs_visitor::bld in remaining places
...
The remaining users can simply create a new builder at_end() if needed.
In many places a new builder object is already being constructed, so
just give more specific instructions.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:14 +00:00
Caio Oliveira
c73c1aa496
intel/compiler: Annotate and use nir_to_brw_state::bld
...
Use the "current bld" in nir_to_brw_state more widely, and also replace it
with an annotated version when applicable (to associate it with a NIR
instruction being lowered). After filling a block we reset it back to
the original value.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
34c28680b1
intel/compiler: Stop using fs_visitor::bld field in NIR conversion
...
Provide its own builder in nir_to_brw_state. Will allow eventually remove
the one in fs_visitor.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
79735fa783
intel/compiler: Move remaining NIR conversion fields to nir_to_brw_state
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
5cb189636d
intel/compiler: Move nir_ssa_value into a local structure
...
Create a nir_to_brw_state struct that is valid only during the
NIR to backend translation and use it for nir_ssa_values array.
This removes some NIR specific handling out of the fs_visitor -- nowadays
effectively an fs_shader.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
afe75d65be
intel/compiler: Make NIR resources helpers static
...
Remove get_nir_src_block() since it is not used anywhere.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
a7a27ee95e
intel/compiler: Make NIR atomic conversion functions static
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
5777943381
intel/compiler: Make non-intrinsic NIR conversion functions static
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
2385d6087a
intel/compiler: Make setup functions of NIR emission static
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
3899e6b1d8
intel/compiler: Make functions for NIR control flow conversion static
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
860ec33f9a
intel/compiler: Make more functions in NIR conversion static
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
acca9dbf6b
intel/compiler: Make a NIR intrinsic emission functions static
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
c12460b01e
intel/compiler: Move NIR emission code to brw_fs_nir.cpp
...
This is a preparation to reorganize NIR emission code.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Caio Oliveira
1ef6415d22
intel/compiler: Remove unused headers
...
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26323 >
2023-12-12 19:36:13 +00:00
Faith Ekstrand
3e308903eb
nvk: Enable NAK by default for Volta
...
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26214 >
2023-12-12 18:48:11 +00:00