Commit graph

176295 commits

Author SHA1 Message Date
Matt Coster
afe9b73cd5 pvr: Clean up extension tables
Switches PVR_USE_WSI_PLATFORM to be an always defined boolean to allow
for cleaner use in the extension tables (borrowed from tu) and extends
the pattern to create PVR_USE_WSI_PLATFORM_* equivalents for each
supported platform.

Also fixes the ordering to match the struct definitions.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24489>
2023-08-10 15:38:37 +00:00
Eric Engestrom
efb3c93d5f ci: build hasvk in debian-vulkan job
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24586>
2023-08-10 14:53:21 +00:00
Eric Engestrom
9dfd8b3723 ci: reorder vk drivers alphabetically in debian-vulkan job
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24586>
2023-08-10 14:53:21 +00:00
David Rosca
ee6eadb65a ci/amd: Skip all VAAPI tests that creates too many huge surfaces
These tests creates up to thousand surfaces of 8192x8192 or
10240x10240 sizes which often times out.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9472
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24590>
2023-08-10 14:20:13 +00:00
Matt Coster
06c8ebaa66 pvr: Pad rogue_regarray_cache_key union members to avoid UB
GCC zeroes out the unreferenced parts of the union when assigning by
the smaller member, but clang doesn't. Neither is wrong, because the C
standard calls this UB; insert padding to ensure any compiler behaves
predictably.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24477>
2023-08-10 13:00:40 +00:00
Mike Blumenkrantz
e15832e6f4 zink: don't try to replace separate shader prog in noopt mode
this crashes

Fixes: ca2e2f4bd0 ("zink: apply ZINK_DEBUG=noopt to linked separate shaders")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24606>
2023-08-10 12:32:58 +00:00
Eric Engestrom
5862568663 docs/v3dv: mark direct display extensions as implemented
Fixes: bf5cfb6486 ("v3dv: Enable (leased) direct display extensions.")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24584>
2023-08-10 11:39:10 +00:00
Gert Wollny
d1b0629c41 r600: retire SB optimizer
The NIR backend is good enough and here is already a long list of
reasons why SB should not be called because it doesn't handle certain
instructions correctly.

v2: - remove more references to SB (Vitaly Kuzmin)
    - remove unused sb context (Sam Ravnborg)
v3: - drop used variable

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7166
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24509>
2023-08-10 11:19:36 +00:00
Mike Blumenkrantz
ee6ba2bb57 zink: fix big tcs output io
as in the producer case, big io needs to reserve the appropriate number
of slots

fixes:
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-float-index-rd-after-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-float-index-wr-before-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec2-index-rd-after-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec2-index-wr-before-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec3-index-rd-after-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec3-index-wr-before-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec4-index-rd-after-barrier,Fail
spec@arb_tessellation_shader@execution@variable-indexing@tcs-output-array-vec4-index-wr-before-barrier,Fail

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24568>
2023-08-10 10:44:03 +00:00
Mike Blumenkrantz
ccc195c3a3 zink: explicitly set non-optimal last_vertex_stage shader key on ctx create
this otherwise results in generated gs not having the flag set, which breaks
various things

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24568>
2023-08-10 10:44:03 +00:00
Mike Blumenkrantz
12d997cd64 lavapipe: zero-init pipe_sampler_state
makes trace more reliable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24568>
2023-08-10 10:44:03 +00:00
Mike Blumenkrantz
5b4aa5b999 zink: reindex ssa defs before dumping debug shaders
this makes things more consistent across patches

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24568>
2023-08-10 10:44:03 +00:00
Mike Blumenkrantz
7498c83ace draw: fix so debug offset printing
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24568>
2023-08-10 10:44:03 +00:00
Mike Blumenkrantz
48b0af7217 zink: move ZINK_DEBUG=nir printing to just before compile
it's not useful to know what the nir is when zink receives it, as
this has minimal relation to the spirv that is output

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24568>
2023-08-10 10:44:03 +00:00
Mike Blumenkrantz
f272a88505 zink: fix xfb buffer array sizing to use buffer limit, not output
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24568>
2023-08-10 10:44:03 +00:00
Connor Abbott
aa322a37fc ir3: Implement helper invocation optimization
This kills helper invocations to ensure that subsequent memory accesses
don't fetch unused memory and unnecessary branch divergence from helper
invocations is eliminated.

shader-db results:

total instructions in shared programs: 3840580 -> 3841531 (0.02%)
instructions in affected programs: 278416 -> 279367 (0.34%)
helped: 0
HURT: 744
HURT stats (abs)   min: 1 max: 16 x̄: 1.28 x̃: 1
HURT stats (rel)   min: 0.05% max: 8.51% x̄: 0.75% x̃: 0.39%
95% mean confidence interval for instructions value: 1.22 1.34
95% mean confidence interval for instructions %-change: 0.67% 0.83%
Instructions are HURT.

total nops in shared programs: 866716 -> 867667 (0.11%)
nops in affected programs: 72851 -> 73802 (1.31%)
helped: 0
HURT: 744
HURT stats (abs)   min: 1 max: 16 x̄: 1.28 x̃: 1
HURT stats (rel)   min: 0.17% max: 33.33% x̄: 2.84% x̃: 1.82%
95% mean confidence interval for nops value: 1.22 1.34
95% mean confidence interval for nops %-change: 2.59% 3.08%
Nops are HURT.

total last-baryf in shared programs: 139806 -> 139864 (0.04%)
last-baryf in affected programs: 11772 -> 11830 (0.49%)
helped: 0
HURT: 58
HURT stats (abs)   min: 1 max: 1 x̄: 1.00 x̃: 1
HURT stats (rel)   min: 0.40% max: 5.26% x̄: 0.60% x̃: 0.47%
95% mean confidence interval for last-baryf value: 1.00 1.00
95% mean confidence interval for last-baryf %-change: 0.42% 0.78%
Last-baryf are HURT.

total last-helper in shared programs: 1508295 -> 935561 (-37.97%)
last-helper in affected programs: 1192594 -> 619860 (-48.02%)
helped: 7816
HURT: 3
helped stats (abs) min: 1 max: 1095 x̄: 73.28 x̃: 34
helped stats (rel) min: 0.42% max: 100.00% x̄: 71.91% x̃: 100.00%
HURT stats (abs)   min: 1 max: 11 x̄: 4.67 x̃: 2
HURT stats (rel)   min: 0.80% max: 1.44% x̄: 1.03% x̃: 0.86%
95% mean confidence interval for last-helper value: -75.64 -70.86
95% mean confidence interval for last-helper %-change: -72.67% -71.10%
Last-helper are helped.

fossil-db results:

Totals:
Instrs: 55172795 -> 55189122 (+0.03%)
CodeSize: 108952746 -> 108984452 (+0.03%)
NOPs: 11536680 -> 11553007 (+0.14%)
(ss)-stall: 4166810 -> 4166581 (-0.01%)
(sy)-stall: 15890324 -> 15884974 (-0.03%)
last-baryf: 659588 -> 659633 (+0.01%)
last-helper: 25742996 -> 12601636 (-51.05%); split: -51.05%, +0.00%
Cat0: 12294891 -> 12311218 (+0.13%)

Totals from 39576 (25.22% of 156916) affected shaders:
Instrs: 24200008 -> 24216335 (+0.07%)
CodeSize: 44968736 -> 45000442 (+0.07%)
NOPs: 5854965 -> 5871292 (+0.28%)
(ss)-stall: 2357830 -> 2357601 (-0.01%)
(sy)-stall: 6166670 -> 6161320 (-0.09%)
last-baryf: 590330 -> 590375 (+0.01%)
last-helper: 24160432 -> 11019072 (-54.39%); split: -54.39%, +0.00%

Cat0: 6205561 -> 6221888 (+0.26%)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24433>
2023-08-10 10:09:28 +00:00
Connor Abbott
b9489dea3d ir3: Gather pixlod status earlier
We'll need this to skip optimizing helper invocations if it's
unnecessary.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24433>
2023-08-10 10:09:28 +00:00
Connor Abbott
5411f01f93 freedreno, tu, ir3: Add last_helper statistic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24433>
2023-08-10 10:09:28 +00:00
Connor Abbott
1f44d8d51d tu: Add missing last_baryf statistic
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24433>
2023-08-10 10:09:28 +00:00
Connor Abbott
662db8e894 ir3, freedreno, tu: Plumb through SP_FS_PREFETCH_CNTL::ENDOFQUAD
Add a flag but don't use it yet.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24433>
2023-08-10 10:09:28 +00:00
Danylo Piliaiev
86440685f3 freedreno/regs: Define unknown SP_FS_PREFETCH_CNTL fields
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24433>
2023-08-10 10:09:28 +00:00
Connor Abbott
6aabdb7a57 ir3: Parse (eq) flag
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24433>
2023-08-10 10:09:27 +00:00
Eric Engestrom
f22437654a meson: fix indentation
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24603>
2023-08-10 09:28:58 +00:00
Samuel Pitoiset
3bbfc45c37 radv: re-introduce radv_pipeline_stage_init()
This helper is used to initialize a radv_shader_stage struct for
pipelines, while radv_shader_stage_init() would be for shader object
only (ie. using VkCreateShaderInfoEXT).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24562>
2023-08-10 08:51:05 +00:00
Samuel Pitoiset
afcafa1b61 radv: stop passing redundant stage to radv_shader_stage_init()
It's sinfo->stage.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24562>
2023-08-10 08:51:05 +00:00
Samuel Pitoiset
66eaca3a0a radv: introduce radv_shader_layout for per-stage descriptor layout
With pipelines, the shader layout is inherited from the pipeline layout
but with shader objects, the layout is passed through
VkCreateShaderInfoEXT.

This basically replaces uses of radv_pipeline_layout by
radv_shader_layout during shaders compilation. This will avoid
creating a pipeline layout with ESO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24562>
2023-08-10 08:51:05 +00:00
Samuel Pitoiset
7a3e256d27 radv: remove useless NULL for pipeline layout during shader info pass
It should be non-NULL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24562>
2023-08-10 08:51:05 +00:00
Iago Toral Quiroga
6ae2844c52 v3d: fix texture packing lowering
For texture instructions that don't have sampler state we have
been incorrectly using sampler index to retrive texture packing
information. This is incorrect for two reasons:

1. These instructions don't have a defined sampler index by
   definition.
2. The driver was not setting it either, so effectively, we
   have always been using whatever we had set for the first
   texture, which is obviously bogus.

Fix this by running a lowering pass that sets the index to use
in backend_flags, which is what the compiler expects, based on
the texture index, which is what we want in GL since we make
this decision based on the texture format.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24537>
2023-08-10 07:10:01 +00:00
Iago Toral Quiroga
d28e5960e5 v3dv: assert that only tex instructions with sampler state have a sampler src
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24537>
2023-08-10 07:10:01 +00:00
Iago Toral Quiroga
da625903c7 squash! v3dv,broadcom/compiler: don't abuse sampler index
For tex instructions that don't have sampler state use backend_flags
instead of sampler index to bind default sampler state.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24537>
2023-08-10 07:10:01 +00:00
Iago Toral Quiroga
b2de3f71dc nir/lower_tex: use a callback to check sampler return size packing
The lower_tex_packing pass relies on the sampler index to access packing
information, but this is only valid for tex instructions that have sampler
state (so not txf, etc). Instead, let backends provide a callback to inform
the lowering about the packing used with a given texture instruction which
is more flexible.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24537>
2023-08-10 07:10:00 +00:00
Iago Toral Quiroga
374c660582 nir/lower_tex: copy backend_flags field when copying a tex instruction
Fixes: 29c4417fb8 ('nir: Add a backend_flags field to nir_tex_instr')
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24537>
2023-08-10 07:10:00 +00:00
Iago Toral Quiroga
a95c33eeaf v3dv: remove unused code
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24537>
2023-08-10 07:10:00 +00:00
Lionel Landwerlin
6f694432e4 intel/fs: add variable for output of debug backend optimizer
It can be useful to compare 2 runs with different compiler changes.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24552>
2023-08-10 06:39:57 +00:00
Lionel Landwerlin
0e244d56e3 intel/fs: track more steps with INTEL_DEBUG=optimizer
One particular nice thing to have is the first generated backend IR
before validation. Especially if you made a mistake in the NIR
translation, you can at least look at it before validation tells you
off.

Then the last 2 steps of the optimize() function can be interesting to
look at.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24552>
2023-08-10 06:39:57 +00:00
Vinson Lee
f9cd8446ef lavapipe: Fix struct initialization
Fix defect reported by Coverity Scan.

Evaluation order violation (EVALUATION_ORDER)
write_write_typo: In box.x = box.x = copy->imageOffset.x, box.x is written twice with the same value.

Fixes: 9e9d90c6c3 ("lavapipe: VK_EXT_host_image_copy")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24531>
2023-08-09 23:15:10 -07:00
Dave Airlie
81cae3d8d2 nvk: enable KHR_shader_clock.
This should all be wired up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24595>
2023-08-10 03:39:49 +00:00
Samuel Pitoiset
ba49f2bef1 radv: advertise VK_KHR_maintenance5
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
54caa8d346 radv: implement radv_Get{Device}ImageSubresourceLayout2KHR()
Not really possible without creating an image internally.

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
6861c5275b radv: allow VK_REMAINING_ARRAY_LAYERS with VkImageSubresourceLayers
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
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