platform/upstream/mesa.git
20 months agoanv: force MEDIA_INTERFACE_DESCRIPTOR_LOAD reemit after 3D->GPGPU switch
Lionel Landwerlin [Sun, 12 Jun 2022 20:59:05 +0000 (23:59 +0300)]
anv: force MEDIA_INTERFACE_DESCRIPTOR_LOAD reemit after 3D->GPGPU switch

Seems to fix a hang in the following titles :
   - Age of Empire 4
   - Monster Hunter Rise

where the HW is hung on a PIPE_CONTROL after a GPGPU_WALKER but no
MEDIA_INTERFACE_DESCRIPTOR_LOAD was emitted since the switch from 3D
to GPGPU.

This would happen in the following case :

   vkCmdBindPipeline(COMPUTE, cs_pipeline);
   vkCmdDispatch(...);
   vkCmdBindPipeline(GRAPHICS, gfx_pipeline);
   vkCmdDraw(...);
   vkCmdDispatch(...);

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17247>

20 months agoradv/rt: Fix updating stack_size if the shader uses scratch
Konstantin Seurer [Tue, 7 Mar 2023 07:28:54 +0000 (08:28 +0100)]
radv/rt: Fix updating stack_size if the shader uses scratch

src_vars contains the stack_size of the shader that is about to get inlined.

Fixes: 7fadee9b70c9d1d7229c7bbc9811a858297b193c ('radv/rt: only reserve stack_sizes after rt_case insertion')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21768>

20 months agoci/radv: Skip vkCreateInstance memory-fail test
Daniel Stone [Wed, 8 Mar 2023 16:16:56 +0000 (16:16 +0000)]
ci/radv: Skip vkCreateInstance memory-fail test

This has been failing a bit ever since CTS 1.3.5.0. Skip it for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21789>

20 months agoaco: don't reallocate fma{mk,ak,_mix} instruction
Georg Lehmann [Tue, 7 Mar 2023 12:37:20 +0000 (13:37 +0100)]
aco: don't reallocate fma{mk,ak,_mix} instruction

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21762>

20 months agoaco/optimizer: don't reallocate instruction when converting to VOP3
Georg Lehmann [Tue, 7 Mar 2023 12:28:28 +0000 (13:28 +0100)]
aco/optimizer: don't reallocate instruction when converting to VOP3

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21762>

20 months agolavapipe: break out main shader lowering into separate function
Mike Blumenkrantz [Mon, 6 Mar 2023 20:08:51 +0000 (15:08 -0500)]
lavapipe: break out main shader lowering into separate function

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>

20 months agolavapipe: move uniform inline functions to shader struct
Mike Blumenkrantz [Mon, 6 Mar 2023 20:08:06 +0000 (15:08 -0500)]
lavapipe: move uniform inline functions to shader struct

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>

20 months agolavapipe: rename inline uniform function params
Mike Blumenkrantz [Mon, 6 Mar 2023 20:03:13 +0000 (15:03 -0500)]
lavapipe: rename inline uniform function params

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>

20 months agolavapipe: move xfb init to shader struct
Mike Blumenkrantz [Mon, 6 Mar 2023 19:57:26 +0000 (14:57 -0500)]
lavapipe: move xfb init to shader struct

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>

20 months agolavapipe: more small shader struct usage tweaks
Mike Blumenkrantz [Mon, 6 Mar 2023 19:53:53 +0000 (14:53 -0500)]
lavapipe: more small shader struct usage tweaks

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>

20 months agolavapipe: pass shader struct and layout to scan_pipeline_info()
Mike Blumenkrantz [Mon, 6 Mar 2023 19:51:49 +0000 (14:51 -0500)]
lavapipe: pass shader struct and layout to scan_pipeline_info()

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>

20 months agolavapipe: split out shader struct members into their own struct
Mike Blumenkrantz [Mon, 6 Mar 2023 19:40:58 +0000 (14:40 -0500)]
lavapipe: split out shader struct members into their own struct

kinda gross but simplifies some code

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>

20 months agolavapipe: split out spirv compile of shaders
Mike Blumenkrantz [Mon, 6 Mar 2023 19:16:56 +0000 (14:16 -0500)]
lavapipe: split out spirv compile of shaders

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21778>

20 months agovulkan/wsi: fix crash in failed swapchain creation for wayland
Mike Blumenkrantz [Mon, 27 Feb 2023 17:41:11 +0000 (12:41 -0500)]
vulkan/wsi: fix crash in failed swapchain creation for wayland

this otherwise calls wsi_wl_swapchain_chain_free() before the wsi
pointer has been set

ref #6578

cc: mesa-stable

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21563>

20 months agoradv/rt: use terminate() when returning from raygen shaders
Daniel Schürmann [Thu, 26 Jan 2023 17:45:01 +0000 (18:45 +0100)]
radv/rt: use terminate() when returning from raygen shaders

Q2RTX stats:
Totals from 7 (0.01% of 134913) affected shaders:

CodeSize: 204712 -> 204744 (+0.02%); split: -0.06%, +0.07%
Instrs: 37526 -> 37522 (-0.01%); split: -0.07%, +0.06%
Latency: 950563 -> 956024 (+0.57%)
InvThroughput: 187915 -> 188977 (+0.57%)
Copies: 4829 -> 4763 (-1.37%)
Branches: 1570 -> 1583 (+0.83%)
PreSGPRs: 407 -> 400 (-1.72%)
PreVGPRs: 614 -> 617 (+0.49%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21736>

20 months agoaco: fix NIR infinite loops
Daniel Schürmann [Wed, 8 Mar 2023 04:15:04 +0000 (05:15 +0100)]
aco: fix NIR infinite loops

The previous solution breaks potential loop header phis.
Move the dummy-break to the bottom of the loop.

Fixes: dEQP-VK.reconvergence.subgroup_uniform_control_flow_ballot.*
Fixes: a9c4a31d8d8a955711d6f49869090caf87846f1b ('aco: handle NIR loops without breaks')
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21736>

20 months agonir/gather_info: allow terminate() in non-PS
Daniel Schürmann [Sat, 4 Mar 2023 16:30:35 +0000 (17:30 +0100)]
nir/gather_info: allow terminate() in non-PS

RADV will use terminate() to end ray-tracing shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21736>

20 months agoradv: move device memory related code to radv_device_memory.c
Samuel Pitoiset [Tue, 7 Mar 2023 16:07:10 +0000 (17:07 +0100)]
radv: move device memory related code to radv_device_memory.c

radv_device.c is getting too big.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>

20 months agoradv: move buffer related code to radv_buffer.c
Samuel Pitoiset [Tue, 7 Mar 2023 16:02:34 +0000 (17:02 +0100)]
radv: move buffer related code to radv_buffer.c

radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>

20 months agoradv: move event related code to radv_event.c
Samuel Pitoiset [Tue, 7 Mar 2023 15:44:43 +0000 (16:44 +0100)]
radv: move event related code to radv_event.c

radv_device.c is getting too big.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>

20 months agoradv: move sampler related code to radv_sampler.c
Samuel Pitoiset [Tue, 7 Mar 2023 15:20:25 +0000 (16:20 +0100)]
radv: move sampler related code to radv_sampler.c

radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>

20 months agoradv: move queue related code to radv_queue.c
Samuel Pitoiset [Tue, 7 Mar 2023 14:03:35 +0000 (15:03 +0100)]
radv: move queue related code to radv_queue.c

radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>

20 months agoradv: move physical device related code to radv_physical_device.c
Samuel Pitoiset [Tue, 7 Mar 2023 13:34:57 +0000 (14:34 +0100)]
radv: move physical device related code to radv_physical_device.c

radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>

20 months agoradv: move instance related code to radv_instance.c
Samuel Pitoiset [Tue, 7 Mar 2023 11:26:45 +0000 (12:26 +0100)]
radv: move instance related code to radv_instance.c

radv_device.c is getting too big and this follows the Vulkan common
runtime infrastructure.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21767>

20 months agonir: add nir_lower_alu_width_test.fdot_order
Rhys Perry [Mon, 23 Jan 2023 19:54:12 +0000 (19:54 +0000)]
nir: add nir_lower_alu_width_test.fdot_order

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20812>

20 months agonir: make fdph lowering match fdot
Rhys Perry [Fri, 20 Jan 2023 11:38:43 +0000 (11:38 +0000)]
nir: make fdph lowering match fdot

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20812>

20 months agonir: use xyzw order for precise fdot
Rhys Perry [Fri, 20 Jan 2023 11:32:17 +0000 (11:32 +0000)]
nir: use xyzw order for precise fdot

Fixes flickering grass in Immortals Fenyx Rising.

fossil-db (gfx1100):
Totals from 13969 (10.38% of 134574) affected shaders:
MaxWaves: 442794 -> 442878 (+0.02%)
Instrs: 4861105 -> 4901408 (+0.83%); split: -0.02%, +0.85%
CodeSize: 24316100 -> 24396272 (+0.33%); split: -0.03%, +0.35%
VGPRs: 446256 -> 445572 (-0.15%); split: -0.20%, +0.05%
Latency: 28122456 -> 28162233 (+0.14%); split: -0.10%, +0.24%
InvThroughput: 2899673 -> 2904323 (+0.16%); split: -0.07%, +0.23%
VClause: 119599 -> 119631 (+0.03%); split: -0.07%, +0.09%
SClause: 186636 -> 186265 (-0.20%); split: -0.23%, +0.03%
Copies: 301370 -> 300386 (-0.33%); split: -0.75%, +0.42%
Branches: 85066 -> 85047 (-0.02%); split: -0.02%, +0.00%
PreSGPRs: 436167 -> 436137 (-0.01%)
PreVGPRs: 329715 -> 329809 (+0.03%); split: -0.01%, +0.04%

fossil-db (gfx1100, RADV_DEBUG=invariantgeom):
Totals from 43116 (32.04% of 134574) affected shaders:
MaxWaves: 1332938 -> 1333012 (+0.01%); split: +0.01%, -0.00%
Instrs: 16424513 -> 16658021 (+1.42%); split: -0.06%, +1.48%
CodeSize: 81258868 -> 81827860 (+0.70%); split: -0.07%, +0.77%
VGPRs: 1720368 -> 1719648 (-0.04%); split: -0.19%, +0.15%
SpillSGPRs: 1670 -> 1600 (-4.19%); split: -5.27%, +1.08%
Latency: 82063766 -> 82425418 (+0.44%); split: -0.23%, +0.67%
InvThroughput: 9665803 -> 9727810 (+0.64%); split: -0.09%, +0.73%
VClause: 449662 -> 451099 (+0.32%); split: -0.32%, +0.64%
SClause: 498841 -> 498639 (-0.04%); split: -0.24%, +0.20%
Copies: 1001020 -> 1000770 (-0.02%); split: -1.20%, +1.17%
Branches: 237580 -> 239637 (+0.87%); split: -0.01%, +0.88%
PreSGPRs: 1198167 -> 1198024 (-0.01%); split: -0.01%, +0.00%
PreVGPRs: 1225202 -> 1225035 (-0.01%); split: -0.06%, +0.05%

fossil-db (navi10):
Totals from 13969 (10.38% of 134563) affected shaders:
MaxWaves: 474386 -> 474508 (+0.03%); split: +0.05%, -0.03%
Instrs: 3740895 -> 3771566 (+0.82%); split: -0.00%, +0.82%
CodeSize: 19426592 -> 19459916 (+0.17%); split: -0.00%, +0.18%
VGPRs: 389916 -> 389852 (-0.02%); split: -0.09%, +0.07%
Latency: 25452927 -> 25502482 (+0.19%); split: -0.14%, +0.34%
InvThroughput: 3880807 -> 3923144 (+1.09%); split: -0.07%, +1.16%
VClause: 66835 -> 66712 (-0.18%); split: -0.38%, +0.20%
SClause: 178805 -> 178802 (-0.00%); split: -0.01%, +0.01%
Copies: 167601 -> 167625 (+0.01%); split: -0.54%, +0.56%
Branches: 83788 -> 83784 (-0.00%)
PreSGPRs: 388229 -> 388216 (-0.00%)
PreVGPRs: 342984 -> 343062 (+0.02%); split: -0.01%, +0.03%

fossil-db (navi10, RADV_DEBUG=invariantgeom):
Totals from 43116 (32.04% of 134563) affected shaders:
MaxWaves: 1260184 -> 1256414 (-0.30%); split: +0.10%, -0.40%
Instrs: 12804951 -> 12983628 (+1.40%); split: -0.01%, +1.41%
CodeSize: 65813224 -> 66137852 (+0.49%); split: -0.03%, +0.52%
VGPRs: 1556396 -> 1561340 (+0.32%); split: -0.09%, +0.41%
SpillSGPRs: 1377 -> 1395 (+1.31%)
Latency: 76095867 -> 76355111 (+0.34%); split: -0.32%, +0.66%
InvThroughput: 13546863 -> 13788789 (+1.79%); split: -0.05%, +1.84%
VClause: 310910 -> 311283 (+0.12%); split: -0.63%, +0.75%
SClause: 474878 -> 474941 (+0.01%); split: -0.09%, +0.10%
Copies: 639367 -> 637610 (-0.27%); split: -1.03%, +0.76%
Branches: 240178 -> 240185 (+0.00%); split: -0.00%, +0.00%
PreSGPRs: 1056594 -> 1056590 (-0.00%); split: -0.00%, +0.00%
PreVGPRs: 1247950 -> 1247798 (-0.01%); split: -0.05%, +0.04%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7920
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20812>

20 months agoaux/tc: fix rp info resizing clobbering current info
Mike Blumenkrantz [Mon, 6 Mar 2023 12:39:52 +0000 (07:39 -0500)]
aux/tc: fix rp info resizing clobbering current info

the recording rp_info may be a pointer to a member of the array being
reallocated, so test for this and re-set it to avoid invalid memory
access

found with this caselist:
KHR-GL46.texture_gather.offset-gather-unorm-2darray
KHR-GL46.texture_view.view_sampling

cc: mesa-stable

Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21729>

20 months agoanv: report max register pressure in pipeline properties
Lionel Landwerlin [Fri, 3 Feb 2023 16:02:47 +0000 (17:02 +0100)]
anv: report max register pressure in pipeline 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/21756>

20 months agointel/fs: report max register pressure in shader stats
Lionel Landwerlin [Fri, 3 Feb 2023 16:02:28 +0000 (17:02 +0100)]
intel/fs: report max register pressure in shader stats

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/21756>

20 months agoanv/iris: report counter symbols with debug option
Lionel Landwerlin [Thu, 21 Jul 2022 08:25:39 +0000 (08:25 +0000)]
anv/iris: report counter symbols with debug option

v2: rename to INTEL_DEBUG=perf-symbol-names

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/17672>

20 months agoradv: disable DCC with signedness reinterpretation on GFX11
Samuel Pitoiset [Mon, 6 Mar 2023 18:06:17 +0000 (19:06 +0100)]
radv: disable DCC with signedness reinterpretation on GFX11

All formats should be compatible on GFX11 but for some weird reasons
DCC with signedness reinterpretation doesn't work as expected, like
R8_UINT<->R8_SINT. Note that RadeonSI also has issues with this.

This might be a hardware bug on RDNA3.

This fixes DCC issues with Cyberpunk and A Plague Tale: Requiem.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8020
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8371
Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21755>

20 months agoradeonsi: fix fast depth_clear_value/stencil_clear_value
Pierre-Eric Pelloux-Prayer [Tue, 7 Mar 2023 13:53:42 +0000 (14:53 +0100)]
radeonsi: fix fast depth_clear_value/stencil_clear_value

We need to update the when promoting from non-TC-compatible to
TC-compatible or we'll get incorrect values in the buffer.

Fixes: 9defe8aca95 ("radeonsi: implement fast Z/S clears using clear_buffer on HTILE")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8418
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21726>

20 months agoradeonsi: don't use PKT3_SET_SH_REG_INDEX on gfx9 and older
Pierre-Eric Pelloux-Prayer [Tue, 7 Mar 2023 12:51:14 +0000 (13:51 +0100)]
radeonsi: don't use PKT3_SET_SH_REG_INDEX on gfx9 and older

Fixes: ccaaf8fe04c ("amd: massively simplify how info->spi_cu_en is applied")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8464
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21726>

20 months agoradeonsi/test: update test results
Pierre-Eric Pelloux-Prayer [Mon, 6 Mar 2023 11:46:02 +0000 (12:46 +0100)]
radeonsi/test: update test results

Depends on https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/779
to fix glx-make-current GLX errors.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21726>

20 months agoradeonsi/test: use gbm-skips.txt
Pierre-Eric Pelloux-Prayer [Mon, 6 Mar 2023 09:58:03 +0000 (10:58 +0100)]
radeonsi/test: use gbm-skips.txt

Use shared skips file to avoid running tests that can't pass on gbm.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21726>

20 months agoradv: enable VK_KHR_fragment_shading_rate on GFX11
Samuel Pitoiset [Thu, 15 Dec 2022 10:04:49 +0000 (11:04 +0100)]
radv: enable VK_KHR_fragment_shading_rate on GFX11

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>

20 months agoradv: advertise attachmentFragmentShadingRate on GFX11
Samuel Pitoiset [Tue, 15 Nov 2022 07:34:33 +0000 (07:34 +0000)]
radv: advertise attachmentFragmentShadingRate on GFX11

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>

20 months agoradv: do not emit PA_SC_VRS_OVERRIDE_CNTL from the pipeline on GFX11
Samuel Pitoiset [Thu, 15 Dec 2022 11:26:07 +0000 (12:26 +0100)]
radv: do not emit PA_SC_VRS_OVERRIDE_CNTL from the pipeline on GFX11

PA_SC_VRS_OVERRIDE_CNTL is emitted when a framebuffer is bound because
it controls the VRS surface enable bit. Though, if a pipeline is bound
after the framebuffer is emitted, it can override the state. Remove it
completely since VRS for flat shading and RADV_FORCE_VRS are disabled.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>

20 months agoradv: add support for VRS attachment on GFX11
Samuel Pitoiset [Thu, 15 Dec 2022 10:54:01 +0000 (11:54 +0100)]
radv: add support for VRS attachment on GFX11

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>

20 months agoac/surface: add RADEON_SURF_VRS_RATE for selecting swizzle mode on GFX11
Samuel Pitoiset [Thu, 16 Feb 2023 09:44:21 +0000 (10:44 +0100)]
ac/surface: add RADEON_SURF_VRS_RATE for selecting swizzle mode on GFX11

On GFX11, VRS rate images can't use linear tiling and the swizzle mode
must be either SW_Z or SW_R.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>

20 months agoradv: move disabling DCC for VRS rate images in radv_get_surface_flags()
Samuel Pitoiset [Thu, 16 Feb 2023 09:39:12 +0000 (10:39 +0100)]
radv: move disabling DCC for VRS rate images in radv_get_surface_flags()

On GFX11, the VRS rate image needs a specific swizzle mode and a new
flag will be added here.

gned-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20333>

20 months agoanv: enable VK_EXT_pipeline_library_group_handles
Lionel Landwerlin [Thu, 8 Dec 2022 15:21:40 +0000 (17:21 +0200)]
anv: enable VK_EXT_pipeline_library_group_handles

A noop for us.

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/20929>

20 months agoradeonsi: increase NGG workgroup size to 256 for VS/TES with streamout and GS
Marek Olšák [Sat, 25 Feb 2023 22:52:24 +0000 (17:52 -0500)]
radeonsi: increase NGG workgroup size to 256 for VS/TES with streamout and GS

NGG streamout performance is limited by the workgroup size, so make it as
large as possible.

Since this uses si_get_max_workgroup_size() to set the NGG workgroup size,
the side effect is that all GS is also getting an increase to 256, which
is OK.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoradeonsi: allow using 64K LDS for NGG to allow larger workgroups
Marek Olšák [Sat, 25 Feb 2023 22:41:39 +0000 (17:41 -0500)]
radeonsi: allow using 64K LDS for NGG to allow larger workgroups

This should help with NGG streamout performance, which is limited by
the workgroup size (it should be as large as possible).

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoradeonsi: other cosmetic changes in si_state_shaders.cpp
Marek Olšák [Sat, 25 Feb 2023 22:32:01 +0000 (17:32 -0500)]
radeonsi: other cosmetic changes in si_state_shaders.cpp

VS_W32_EN has no effect on Gfx11, but we better not set it.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoradeonsi: reorganize si_shader_ps
Marek Olšák [Sat, 25 Feb 2023 22:31:31 +0000 (17:31 -0500)]
radeonsi: reorganize si_shader_ps

To make branching based on gfx_level nicer and the code in a logical order.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoradeonsi: reorganize si_shader_ngg
Marek Olšák [Sat, 25 Feb 2023 22:30:08 +0000 (17:30 -0500)]
radeonsi: reorganize si_shader_ngg

To make branching based on gfx_level nicer and the code in a logical order.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoradeonsi: reorganize si_shader_hs
Marek Olšák [Sat, 25 Feb 2023 22:26:17 +0000 (17:26 -0500)]
radeonsi: reorganize si_shader_hs

To make branching based on gfx_level nicer and the code in a logical order.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoradeonsi: reindent si_shader_ls, si_shader_es, si_shader_gs, si_shader_vs
Marek Olšák [Sat, 25 Feb 2023 22:25:56 +0000 (17:25 -0500)]
radeonsi: reindent si_shader_ls, si_shader_es, si_shader_gs, si_shader_vs

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoradeonsi: set pm4.atom.emit in si_get_shader_pm4_state
Marek Olšák [Sat, 25 Feb 2023 22:19:06 +0000 (17:19 -0500)]
radeonsi: set pm4.atom.emit in si_get_shader_pm4_state

except gfx10_shader_ngg, which isn't as trivial

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoradeonsi: lower nir_texop_sampler_descriptor_amd
Marek Olšák [Thu, 23 Feb 2023 17:58:16 +0000 (12:58 -0500)]
radeonsi: lower nir_texop_sampler_descriptor_amd

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoradeonsi: separate nir_texop_descriptor_amd lowering
Marek Olšák [Thu, 23 Feb 2023 18:01:45 +0000 (13:01 -0500)]
radeonsi: separate nir_texop_descriptor_amd lowering

This moves the code to a separate branch to make it less intertwined
with the rest to allow sampler descriptor lowering later.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoradeonsi: merge si_emit_initial_compute_regs with si_init_cs_preamble_state
Marek Olšák [Wed, 22 Feb 2023 11:38:00 +0000 (06:38 -0500)]
radeonsi: merge si_emit_initial_compute_regs with si_init_cs_preamble_state

It's better to set all immutable registers in one place.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoradeonsi: emulate VGT_ESGS_RING_ITEMSIZE in the shader on gfx9-11
Marek Olšák [Mon, 20 Feb 2023 06:07:58 +0000 (01:07 -0500)]
radeonsi: emulate VGT_ESGS_RING_ITEMSIZE in the shader on gfx9-11

The hardware uses the register to premultiply GS vertex indices
in input VGPRs.

This changes the behavior as follows:
- VGT_ESGS_RING_ITEMSIZE is always 1 on gfx9-11, set in the preamble.
- The value is passed to the shader via current_gs_state (vs_state_bits).
- The shader does the multiplication.

The reason is that VGT_ESGS_RING_ITEMSIZE will be removed 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/21403>

20 months agoac/nir: clear nir_var_shader_out from TCS barriers
Timur Kristóf [Thu, 2 Mar 2023 05:47:30 +0000 (00:47 -0500)]
ac/nir: clear nir_var_shader_out from TCS barriers

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403>

20 months agoaco: Don't include headers from radv.
Timur Kristóf [Fri, 3 Mar 2023 19:52:52 +0000 (11:52 -0800)]
aco: Don't include headers from radv.

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/21696>

20 months agoaco, radv: Don't use radv_shader_args in aco.
Timur Kristóf [Fri, 3 Mar 2023 19:47:02 +0000 (11:47 -0800)]
aco, radv: Don't use radv_shader_args in aco.

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/21696>

20 months agoaco, radv: Move PS epilog and VS prolog args to their info structs.
Timur Kristóf [Fri, 3 Mar 2023 19:35:19 +0000 (11:35 -0800)]
aco, radv: Move PS epilog and VS prolog args to their info structs.

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/21696>

20 months agoaco, radv: Rename aco_*_key to aco_*_info.
Timur Kristóf [Fri, 3 Mar 2023 19:25:21 +0000 (11:25 -0800)]
aco, radv: Rename aco_*_key to aco_*_info.

The naming of aco_*_key didn't make sense because they
were never actually used as cache keys, only radv_*_key
are used as cache keys.

Rename the aco structs to aco_*_info instead.

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/21696>

20 months agoaco, radv: Move is_trap_handler_shader to aco info.
Qiang Yu [Thu, 22 Sep 2022 07:21:07 +0000 (15:21 +0800)]
aco, radv: Move is_trap_handler_shader to aco info.

v2 by Timur Kristóf:
- Rebase this patch on latest main.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-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/21696>

20 months agoaco, radv: Add load_grid_size_from_user_sgpr to aco options.
Qiang Yu [Thu, 22 Sep 2022 13:47:49 +0000 (21:47 +0800)]
aco, radv: Add load_grid_size_from_user_sgpr to aco options.

v2 by Timur Kristóf:
- Rebase this patch.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Reviewed-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/21696>

20 months agoaco: Generalize vs_inputs to args_pending_vmem.
Timur Kristóf [Fri, 3 Mar 2023 01:30:49 +0000 (17:30 -0800)]
aco: Generalize vs_inputs to args_pending_vmem.

Handle arguments that need a waitcnt without relying on
RADV specific VS input information.

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/21696>

20 months agoradv: Set pending_vmem on dynamic VS input args.
Timur Kristóf [Fri, 3 Mar 2023 01:29:53 +0000 (17:29 -0800)]
radv: Set pending_vmem on dynamic VS input args.

These are loaded from VMEM and need a waitcnt before use.

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/21696>

20 months agoac: Add pending_vmem field to args.
Timur Kristóf [Fri, 3 Mar 2023 01:29:26 +0000 (17:29 -0800)]
ac: Add pending_vmem field to args.

This is to indicate when an argument was loaded from VMEM
and needs a waitcnt before it can be used.

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/21696>

20 months agofreedreno: Promote non-drawing batches to sysmem
Rob Clark [Sun, 26 Feb 2023 19:58:21 +0000 (11:58 -0800)]
freedreno: Promote non-drawing batches to sysmem

Sometimes we can end up with a sequence where we need to flush a batch
with no clears and no draws (for ex, to get a fence).  Promote these to
sysmem.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21747>

20 months agozink: hook up buffer TRANSFER_DST barrier optimizing
Mike Blumenkrantz [Mon, 27 Feb 2023 18:50:13 +0000 (13:50 -0500)]
zink: hook up buffer TRANSFER_DST barrier optimizing

this should massively optimize e.g., incremental index buffer overwrites

ref #8358

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21779>

20 months agozink: add a driver workaround to disable copy box optimizations
Mike Blumenkrantz [Tue, 7 Mar 2023 20:15:44 +0000 (15:15 -0500)]
zink: add a driver workaround to disable copy box optimizations

turnip is nonconformant regarding cache access (see noted issue),
meaning that any attempt to omit barriers breaks things

qcom proprietary may also be affected

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21779>

20 months agozink: add a mechanism to trigger copy box resets from batch state reset
Mike Blumenkrantz [Tue, 7 Mar 2023 18:40:20 +0000 (13:40 -0500)]
zink: add a mechanism to trigger copy box resets from batch state reset

the resource isn't available during batch state reset, so a new flag
is needed to force a reset the next time the copy boxes would be used

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21779>

20 months agozink: add a mechanism for managing TRANSFER_DST buffer barriers
Mike Blumenkrantz [Mon, 27 Feb 2023 18:48:48 +0000 (13:48 -0500)]
zink: add a mechanism for managing TRANSFER_DST buffer barriers

this enables successive or unrelated transfer writes to avoid triggering
barriers, and ensuing reads of those writes should trigger their own
barriers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21779>

20 months agozink: track the last write access for resources
Mike Blumenkrantz [Mon, 27 Feb 2023 21:41:14 +0000 (16:41 -0500)]
zink: track the last write access for resources

this enables some optimization

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21779>

20 months agoradeonsi: Add support for DPB resize
SureshGuttula [Mon, 27 Feb 2023 09:23:17 +0000 (14:53 +0530)]
radeonsi: Add support for DPB resize

This patch will add support for dpb resize when low to high resolution
change/ svc use-cases.

With DPB tier1 type,vp9 svc decoder use cases are failed. This
Change will fix this[VCN1/VCN2].

Signed-off-by: SureshGuttula <suresh.guttula@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21548>

20 months agoasahi: disable disk cache in debug runs
Rose Hudson [Tue, 7 Mar 2023 20:15:07 +0000 (20:15 +0000)]
asahi: disable disk cache in debug runs

With debug flags enabled, shaders might get compiled differently and
running compilation might be desired e.g. for logging, so don't try to
cache them.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21776>

20 months agoagx: isolate compiler debug flags
Rose Hudson [Sun, 5 Mar 2023 15:46:58 +0000 (15:46 +0000)]
agx: isolate compiler debug flags

The gallium disk cache is about to depend on these, and I don't want to
create a dependency on agx_opcodes.h.py for that. So, make a new header
for them that doesn't have build dependencies.
Rename them to agx_compiler_* too, to avoid collisions with the other
driver debug flags.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21776>

20 months agointel/ci: Remove skipped float_controls tests from hasvk xfails
Väinö Mäkelä [Sun, 5 Mar 2023 14:55:37 +0000 (16:55 +0200)]
intel/ci: Remove skipped float_controls tests from hasvk xfails

These tests are skipped now because preserving denorms isn't supported.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21719>

20 months agointel/ci: Remove hasvk xfails missing from the CTS
Väinö Mäkelä [Sun, 5 Mar 2023 14:52:38 +0000 (16:52 +0200)]
intel/ci: Remove hasvk xfails missing from the CTS

These broken tests no longer exist in the CTS and all dynamic rendering
tests pass now.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21719>

20 months agointel/ci: Remove outdated hasvk copy_and_blit xfails
Väinö Mäkelä [Sun, 5 Mar 2023 14:49:20 +0000 (16:49 +0200)]
intel/ci: Remove outdated hasvk copy_and_blit xfails

These were fixed by commit e509afac.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21719>

20 months agomesa/program: fix memory leak triggered by arb alias
Patrick Lerda [Thu, 16 Feb 2023 00:43:20 +0000 (01:43 +0100)]
mesa/program: fix memory leak triggered by arb alias

The function _mesa_symbol_table_add_symbol() copies the string with strdup(),
the original string should be freed.

For instance, with "piglit/fp-fragment-position -auto -fbo":
Direct leak of 7 byte(s) in 1 object(s) allocated from:
    #0 0xffff99c59050 in __interceptor_strdup (/usr/lib64/libasan.so.6+0x59050)
    #1 0xffff8f53d24c in handle_ident ../src/mesa/program/program_lexer.l:129
    #2 0xffff8f53d24c in _mesa_program_lexer_lex ../src/mesa/program/program_lexer.l:312
    #3 0xffff8f529d10 in yylex ../src/mesa/program/program_parse.y:289
    #4 0xffff8f529d10 in yyparse src/mesa/program/program_parse.tab.c:2140
    #5 0xffff8f5341a4 in _mesa_parse_arb_program ../src/mesa/program/program_parse.y:2589
    #6 0xffff8f51e96c in _mesa_parse_arb_fragment_program ../src/mesa/program/arbprogparse.c:82
    #7 0xffff8f4d867c in set_program_string ../src/mesa/main/arbprogram.c:402

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21728>

20 months agomesa/program: fix memory leak triggered by multiple targets used on one texture image...
Patrick Lerda [Tue, 28 Feb 2023 17:38:56 +0000 (18:38 +0100)]
mesa/program: fix memory leak triggered by multiple targets used on one texture image unit

For instance, with "piglit-2000/bin/asmparsertest ARBfp1.0 tests/asmparsertest/shaders/ARBfp1.0/shadow-02.txt":
Direct leak of 192 byte(s) in 2 object(s) allocated from:
    #0 0x7f6e8378f987 in calloc (/usr/lib64/libasan.so.6+0xb1987)
    #1 0x7f6e7769d620 in asm_instruction_copy_ctor ../src/mesa/program/program_parse.y:2146
    #2 0x7f6e7769d620 in yyparse ../src/mesa/program/program_parse.y:439
    #3 0x7f6e776a6725 in _mesa_parse_arb_program ../src/mesa/program/program_parse.y:2590
    #4 0x7f6e77687f69 in _mesa_parse_arb_fragment_program ../src/mesa/program/arbprogparse.c:82
    #5 0x7f6e77630765 in set_program_string ../src/mesa/main/arbprogram.c:402
    #6 0x7f6e76ec3e8a in _mesa_unmarshal_ProgramStringARB src/mapi/glapi/gen/marshal_generated2.c:4152
    #7 0x7f6e76a0e585 in glthread_unmarshal_batch ../src/mesa/main/glthread.c:122
    #8 0x7f6e76a1031d in _mesa_glthread_finish ../src/mesa/main/glthread.c:383
    #9 0x7f6e76a1031d in _mesa_glthread_finish ../src/mesa/main/glthread.c:348
    #10 0x7f6e76e6a062 in _mesa_marshal_GetError src/mapi/glapi/gen/marshal_generated1.c:1809

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21728>

20 months agomesa/program: fix memory leak triggered by invalid extended swizzle selector
Patrick Lerda [Tue, 28 Feb 2023 16:49:14 +0000 (17:49 +0100)]
mesa/program: fix memory leak triggered by invalid extended swizzle selector

For instance, with "piglit/bin/asmparsertest ARBfp1.0 tests/asmparsertest/shaders/ARBfp1.0/swz-04.txt":
Direct leak of 18 byte(s) in 2 object(s) allocated from:
    #0 0x7f97e99050 in __interceptor_strdup (/usr/lib64/libasan.so.6+0x59050)
    #1 0x7f8d4160ac in handle_ident ../src/mesa/program/program_lexer.l:129
    #2 0x7f8d4160ac in _mesa_program_lexer_lex ../src/mesa/program/program_lexer.l:312
    #3 0x7f8d402b50 in yylex ../src/mesa/program/program_parse.y:289
    #4 0x7f8d402b50 in yyparse src/mesa/program/program_parse.tab.c:2140
    #5 0x7f8d40d01c in _mesa_parse_arb_program ../src/mesa/program/program_parse.y:2590
    #6 0x7f8d3f77ac in _mesa_parse_arb_fragment_program ../src/mesa/program/arbprogparse.c:82
    #7 0x7f8d3ad468 in set_program_string ../src/mesa/main/arbprogram.c:402

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21728>

20 months agoaco/assembler/gfx11: simplify 16bit VOP12C promotion to VOP3
Georg Lehmann [Fri, 3 Feb 2023 12:28:32 +0000 (13:28 +0100)]
aco/assembler/gfx11: simplify 16bit VOP12C promotion to VOP3

With the shared struct for modifies, this is can be a lot cleaner now.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21761>

20 months agoradeonsi/gfx11: only allocate GDS OA for streamout, GDS memory is not needed
Marek Olšák [Sat, 25 Feb 2023 01:32:34 +0000 (20:32 -0500)]
radeonsi/gfx11: only allocate GDS OA for streamout, GDS memory is not needed

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21584>

20 months agoamd/llvm,radeonsi/gfx11: switch to using GDS_STRMOUT registers
Marek Olšák [Thu, 2 Jun 2022 19:43:07 +0000 (15:43 -0400)]
amd/llvm,radeonsi/gfx11: switch to using GDS_STRMOUT registers

This is required by register shadowing (required by the new PAIRS packets),
preemption, user queues, and we only have to wait for VS after streamout,
not PS. This is how gfx11 streamout should have been done.

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21584>

20 months agoamd: add nir_intrinsic_xfb_counter_sub_amd and fix overflowed streamout offsets
Marek Olšák [Tue, 28 Feb 2023 04:07:02 +0000 (23:07 -0500)]
amd: add nir_intrinsic_xfb_counter_sub_amd and fix overflowed streamout offsets

Fixes: 5ec79f989988ba - ac/nir/ngg: nogs support streamout

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21584>

20 months agointel/fs: use generated workaround helpers for Wa_14017989577
Mark Janes [Sat, 21 Jan 2023 07:19:34 +0000 (23:19 -0800)]
intel/fs: use generated workaround helpers for Wa_14017989577

Wa_14017989577 is a clone of Wa_14015360517, which applies to several
platforms beyond INTEL_PLATFORM_DG2_G10.

Update references to Wa_14017989577, and use the generated workaround
helper to ensure application to the proper platforms.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21744>

20 months agoci/etnaviv: Drop the dEQP-GLES2.functional.uniform_api.random.94 xfail.
Emma Anholt [Tue, 7 Mar 2023 17:23:48 +0000 (09:23 -0800)]
ci/etnaviv: Drop the dEQP-GLES2.functional.uniform_api.random.94 xfail.

This has been consistently passing.  I think I just missed it in my
previous update.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21769>

20 months agoci: Add some xfail updates from VKCTS 1.3.5.0 for the manual jobs.
Emma Anholt [Tue, 7 Mar 2023 17:20:25 +0000 (09:20 -0800)]
ci: Add some xfail updates from VKCTS 1.3.5.0 for the manual jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21769>

20 months agollvmpipe: fix LP_PERF=no_depth to ignore depth format
Mike Blumenkrantz [Thu, 16 Feb 2023 17:42:51 +0000 (12:42 -0500)]
llvmpipe: fix LP_PERF=no_depth to ignore depth format

cc: mesa-stable

Reviewed-by: Brian Paul brianp@vmware.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21582>

20 months agov3d/v3dv: define performance counters in common
Juan A. Suarez Romero [Mon, 20 Feb 2023 11:51:00 +0000 (12:51 +0100)]
v3d/v3dv: define performance counters in common

Both OpenGL and Vulkan drivers share the same performance counters.

Let's move them to a common place instead of duplicating.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21420>

20 months agoiris: Add support for 2d images created from buffers
Antonio Gomes [Tue, 27 Dec 2022 06:13:34 +0000 (03:13 -0300)]
iris: Add support for 2d images created from buffers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>

20 months agollvmpipe: Add new caps PIPE_CAP_LINEAR_IMAGE_(PITCH_ALIGNMENT|BASE_ADDRESS_ALIGNMENT)
Antonio Gomes [Sat, 7 Jan 2023 02:54:24 +0000 (23:54 -0300)]
llvmpipe: Add new caps PIPE_CAP_LINEAR_IMAGE_(PITCH_ALIGNMENT|BASE_ADDRESS_ALIGNMENT)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>

20 months agorusticl: Implement spec for cl_khr_image2d_from_buffer
Antonio Gomes [Sat, 7 Jan 2023 02:54:04 +0000 (23:54 -0300)]
rusticl: Implement spec for cl_khr_image2d_from_buffer

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>

20 months agogallium: Add new caps PIPE_CAP_LINEAR_IMAGE_(PITCH_ALIGNMENT|BASE_ADDRESS_ALIGNMENT)
Antonio Gomes [Sat, 7 Jan 2023 02:52:05 +0000 (23:52 -0300)]
gallium: Add new caps PIPE_CAP_LINEAR_IMAGE_(PITCH_ALIGNMENT|BASE_ADDRESS_ALIGNMENT)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>

20 months agolvmpipe/cs: Add support for 2d images created from buffers
Antonio Gomes [Mon, 12 Dec 2022 21:22:31 +0000 (18:22 -0300)]
lvmpipe/cs: Add support for 2d images created from buffers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>

20 months agomesa/st, nine, nouveau: Fix uninitialized pipe_sampler_view structs
Antonio Gomes [Sun, 26 Feb 2023 19:29:45 +0000 (16:29 -0300)]
mesa/st, nine, nouveau: Fix uninitialized pipe_sampler_view structs

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>

20 months agogallium, rusticl: Add tex2d_from_buf in image_view and sampler_view
Antonio Gomes [Mon, 12 Dec 2022 20:35:49 +0000 (17:35 -0300)]
gallium, rusticl: Add tex2d_from_buf in image_view and sampler_view

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>

20 months agorusticl: Enable mapImage for images created from buffers
Antonio Gomes [Wed, 7 Dec 2022 21:35:44 +0000 (18:35 -0300)]
rusticl: Enable mapImage for images created from buffers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>

20 months agorusticl: Enable copy for images created from buffers
Antonio Gomes [Wed, 7 Dec 2022 16:04:00 +0000 (13:04 -0300)]
rusticl: Enable copy for images created from buffers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>

20 months agorusticl: Enabling image fill for images created from buffers
Antonio Gomes [Tue, 6 Dec 2022 21:39:59 +0000 (18:39 -0300)]
rusticl: Enabling image fill for images created from buffers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>

20 months agorusticl: Enabling reading/writing for images created from buffers
Antonio Gomes [Tue, 6 Dec 2022 03:54:12 +0000 (00:54 -0300)]
rusticl: Enabling reading/writing for images created from buffers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>