Commit graph

176255 commits

Author SHA1 Message Date
Samuel Pitoiset
2ed52ca578 radv: add support for VkBufferUsageFlags2CreateInfoKHR
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24392>
2023-08-10 03:05:02 +00:00
Samuel Pitoiset
9089b091b2 radv: add support for VkPipelineCreateFlags2CreateInfoKHR
If the structure is present in pNext, it's used instead of flags.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24392>
2023-08-10 03:05:02 +00:00
Samuel Pitoiset
f4b9c5b1d0 radv: store pipeline create flags to radv_pipeline::create_flags
This is a common practice in vulkan/runtime and this will be easier
to use extended pipeline create flags.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24392>
2023-08-10 03:05:02 +00:00
Samuel Pitoiset
15548d8a5f radv/rmv: remove unused pipeline create flags when logging pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24392>
2023-08-10 03:05:02 +00:00
Samuel Pitoiset
3f617b8e4a radv: allow VK_WHOLE_SIZE for pSizes in vkCmdBindVertexBuffers2()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24392>
2023-08-10 03:05:02 +00:00
Samuel Pitoiset
cbfd2931bb radv: implement vkCmdBindIndexBuffer2KHR()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24392>
2023-08-10 03:05:02 +00:00
Samuel Pitoiset
bbb5cdcf40 vulkan/render_pass: add common vkGetRenderingAreaGranularityKHR()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24392>
2023-08-10 03:05:02 +00:00
Thomas H.P. Andersen
95feb95c95 nvk: advertise VK_EXT_tooling_info
Use the implementation in common code to report no tools in use.

Passes:
dEQP-VK.api.tooling_info.validate_getter
dEQP-VK.api.tooling_info.validate_tools_properties

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24594>
2023-08-10 02:30:45 +00:00
Mike Blumenkrantz
134014dfc7 lavapipe: maintenance5
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
e70179f3c6 lavapipe: VK_REMAINING_ARRAY_LAYERS for copy ops
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
6522b55a39 lavapipe: GetDeviceImageSubresourceLayoutKHR
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
c5a8c97098 lavapipe: BindIndexBuffer2
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
cee494aafd lavapipe: block yuv formats from getting blit feature flags
this is illegal

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
9e2f95eae3 lavapipe: fix resolves where src image has a layer offset
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
8a5936ae2f lavapipe: fix BindVertexBuffers2 buffer size handling
if the size specified is smaller than the buffer, the buffer needs to
be clamped

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
ce09458917 llvmpipe: fix early depth + alpha2coverage + occlusion query interaction
in this scenario, sample counting must happen before a2c, as a2c may eliminate
coverage if alpha is zero, leading to a sample count of zero

dEQP-VK.fragment_operations.early_fragment.sample_count_early_fragment_tests_depth_alpha_to_coverage_samples_4_maintenance5

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
632d4de214 llvmpipe: block weird uses of subsampled formats in buffers
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
6cd51fc1d9 lavapipe: GetRenderingAreaGranularityKHR
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
db7304fe3c llvmpipe: export PIPE_CAP_IMAGE_LOAD_FORMATTED
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
b60ac8b52a llvmpipe: enable A8_UNORM for shader images
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
Mike Blumenkrantz
ba7efa4dfa gallivm: handle A8_UNORM image stores
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24589>
2023-08-10 01:56:03 +00:00
timmac-qmc
ae5a08de67 glsl: fix potential crash with DisableUniformArrayResize
We still need to gather information on uniform use when skipping
uniform array resize.

Fixes: ac5af6c0 ("util/driconf: add Dune: Spice Wars workaround")
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24576>
2023-08-10 01:12:51 +00:00
Georg Lehmann
5c70a55bf3 nir/opt_intrinsics: optimize (exclusive_scan(op, a) op a) to inclusive scan
D3D only has exclusive scans so some games use this pattern.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24557>
2023-08-09 23:10:13 +00:00
Georg Lehmann
7a3e5dd2ec aco: use s_bitreplicate_b64_b32 to set exec to 0xffff0000ffff0000
Foz-DB Navi21:
Totals from 29 (0.02% of 132657) affected shaders:
Instrs: 19342 -> 19301 (-0.21%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24561>
2023-08-09 20:29:01 +00:00
Eric Engestrom
f71d43ecfb git-blame-ignore-revs: add pvr formatting commit
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24583>
2023-08-09 18:23:31 +00:00
Eric Engestrom
3d459fa4da git-blame-ignore-revs: add radv formatting commit
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24583>
2023-08-09 18:23:31 +00:00
Eric Engestrom
415a660aaf git-blame-ignore-revs: repeat instruction on how to enable to avoid having to look for it
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24583>
2023-08-09 18:23:31 +00:00
Mike Blumenkrantz
ca2e2f4bd0 zink: apply ZINK_DEBUG=noopt to linked separate shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24581>
2023-08-09 14:13:47 +00:00
Mike Blumenkrantz
717ad8c5c8 zink: generated tcs is on the tes, not the vs
not sure how I screwed this up

Fixes: 4c47d83051 ("zink: use EXT_shader_object to implement generic separate shader precompile")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24581>
2023-08-09 14:13:47 +00:00
Eric Engestrom
e1ff7893ba docs/radv: mark VK_INTEL_shader_integer_functions2 as implemented
Fixes: aa9d2d8893 ("radv: Enable VK_INTEL_shader_integer_functions2.")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24582>
2023-08-09 14:38:22 +01:00
Eric Engestrom
0e9e033cde docs/radv: mark VK_EXT_tooling_info as implemented
Fixes: 10d1073aa6 ("radv: advertise VK_EXT_tooling_info")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24582>
2023-08-09 14:38:22 +01:00
Eric Engestrom
53231b0137 ci: document max image tag length
I've known about this for years and yet I still accidentally wrote a too
long tag.

Document this for myself next time, and for everyone else.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24560>
2023-08-09 12:00:33 +00:00
David Heidelberg
39e281073a ci/zink: Add flake seen in the wild
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24577>
2023-08-09 10:36:24 +00:00
Georg Lehmann
42ab786e52 ac/nir: handle more special cases in ac_nir_unpack_arg
Foz-DB Navi21:
Totals from 60972 (45.96% of 132657) affected shaders:
CodeSize: 158371336 -> 158127376 (-0.15%)

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24534>
2023-08-09 10:04:53 +00:00
Feng Jiang
82dd60dfb0 virgl/video: Enable AV1 decoding
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23386>
2023-08-09 09:04:58 +00:00
Feng Jiang
c4a1b4e100 virgl/video: Add support for AV1 decoding
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23386>
2023-08-09 09:04:58 +00:00
Feng Jiang
ea5054a94a virgl/video: Add definition of virgl_av1_picture_desc
The virgl_av1_picture_desc references to pipe_av1_picture_desc.

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23386>
2023-08-09 09:04:58 +00:00
Feng Jiang
82ee420b15 frontends/va: Add slice_count to AV1 slice_parameter
Save the number of slice in AV1 slice parameter, so that the
underlying driver (such as virgl) can handle the slice parameters
better.

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Suggested-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23386>
2023-08-09 09:04:58 +00:00
Lionel Landwerlin
c87d5c67d9 anv: implement VK_EXT_pipeline_robustness
v2:
 - Use vk_pipeline_robustness_state

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17545>
2023-08-09 09:03:45 +03:00
Lionel Landwerlin
9934613c74 anv/hasvk: track robustness per pipeline stage
And split them into UBO and SSBO

v2 (Lionel):
 - Get rid of robustness fields in anv_shader_bin
v3 (Lionel):
 - Do not pass unused parameters around

Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17545>
2023-08-09 09:00:12 +03:00
Lionel Landwerlin
c4ec60e87d hasvk: remove descriptor array bounds checking
Same reason as Anv.

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/17545>
2023-08-09 09:00:12 +03:00
Lionel Landwerlin
059e82a469 anv: remove descriptor array bounds checking
We cannot find anything in the Vulkan spec requiring this. D3D12 [1]
says it's undefined as long as it doesn't crash the OS :

   "Out of bounds indexing of any descriptor table from the shader
    results in a largely undefined memory access, including the
    possibility of reading arbitrary in-process memory as if it is a
    hardware state descriptor and living with the consequence of what
    the hardware does with that. This could produce a device reset, but
    will not crash Windows."

[1] : https://learn.microsoft.com/en-us/windows/win32/direct3d12/advanced-use-of-descriptor-tables#out-of-bounds-indexing

Found 2 titles affected by this change

Some pretty good results on Cyberpunk 2077 :

  Totals from 10285 (100.00% of 10285) affected shaders:
  Instrs: 7638709 -> 7517360 (-1.59%); split: -1.64%, +0.05%
  Cycles: 148047414 -> 148470916 (+0.29%); split: -0.83%, +1.12%
  Subgroup size: 112544 -> 112576 (+0.03%); split: +0.04%, -0.01%
  Spill count: 98 -> 90 (-8.16%)
  Fill count: 90 -> 82 (-8.89%)
  Max live registers: 495274 -> 479502 (-3.18%); split: -3.21%, +0.03%
  Max dispatch width: 87824 -> 91168 (+3.81%); split: +4.10%, -0.29%

  Gaining 297 shaders in SIMD16/32, loosing 16 SIMD32 shaders

Some not so good results on Strange Brigade :

  Totals from 4027 (100.00% of 4027) affected shaders:
  Instrs: 2080355 -> 2013880 (-3.20%); split: -3.20%, +0.01%
  Cycles: 25405149 -> 25170579 (-0.92%); split: -1.37%, +0.45%
  Max live registers: 167303 -> 168958 (+0.99%)
  Max dispatch width: 33264 -> 32496 (-2.31%)

  Loosing 96 SIMD16 shaders.

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/17545>
2023-08-09 09:00:12 +03:00
Lionel Landwerlin
0e5b4b1b43 hasvk: fix null descriptor handling with A64 messages
This replicates the same fix we did for Anv and null descriptors with
A64 messages from commit efcda1c530 ("anv: fix null descriptor
handling with A64 messages").

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17545>
2023-08-09 09:00:12 +03:00
Yonggang Luo
8fe6e6957c svga: use alignas over struct MKSGuestStatInfoEntry
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24571>
2023-08-09 05:15:09 +00:00
Yonggang Luo
0ca43db2d0 v3dv: Use alignas(8) over 64 bit atomic value
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24571>
2023-08-09 05:15:09 +00:00
Yonggang Luo
d130c96bda util/treewide: Use alignas(x) instead __attribute__((aligned(x)))
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24571>
2023-08-09 05:15:09 +00:00
Thomas H.P. Andersen
8c25cd307a nvk: EXT_conditional_rendering
This reads the buffer value, combines it with the inverted setting
and sets SET_RENDER_ENABLE depending on this.

This works for draw and clear calls, but not for dispatch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24520>
2023-08-09 04:11:50 +00:00
Dave Airlie
07c70c77de nvk: add cond render upload buffer.
conditional render has some issues with vram, so we have to use
a gart buffer to put the value into. This is similiar to what
nvidia seem to do.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24520>
2023-08-09 04:11:50 +00:00
Dave Airlie
fbe171638e nvk: add gart forced cmd pool side buffer.
Currently we put the upload and cmd bos into GART, however in the
future this might change, but for conditional rendering we must have
 a GART space to read the value from. This creates a separate buffer
allocations that are gart forced. This will be used to provide
cond render with a gart location.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24520>
2023-08-09 04:11:50 +00:00
Timothy Arceri
92c5460253 glsl: mark structs containing images as bindless
Structs are not allowed to contain an image in regular glsl. The only time
they are intended to be allowed to be declared in a struct is when
they are bindless.

Unfortunately the bindless spec does not meantion this behaviour
explicitly so there is no spec quote to reference but you can see in
the original commit to allow them in mesa that spec clarification was
provided 48b7882200

The spec also states that certain uses are implicitly bindless as per
the following spec quote:

   "When used as shader inputs, outputs, uniform block members,
   or temporaries, the value of the sampler is a 64-bit unsigned
   integer handle and never refers to a texture image unit."

Given images are not allowed in regular glsl for the above types
similair to being forbidden in structs, we can also assume
declarations in structs are implicitly bindless.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24269>
2023-08-09 01:27:58 +00:00