Commit graph

219828 commits

Author SHA1 Message Date
Rob Clark
d2b497c4bb freedreno: Move pvtmem to screen
Since shader CSOs can be shared across contexts, we need the
corresponding stateobj to be shareable across contexts.  Otherwise
different ctxs could be racing with each other to build the stateobj.

Prep for next patch.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40352>
2026-03-13 14:52:41 +00:00
Rob Clark
9892e333d0 freedreno: Don't re-bind global buffers
The gallium frontend already has the iova, if we realloc it won't have
the correct address.  Add some asserts around this.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40352>
2026-03-13 14:52:41 +00:00
Rob Clark
310509c60b freedreno: Update pscreen->num_contexts
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40352>
2026-03-13 14:52:41 +00:00
Rob Clark
b587181f91 freedreno: Check for flushed batches
Ignore batches from other contexts (we provide no-cross-context
guarantees) and already flushed zombie batches that haven't yet
been removed from the batch cache table.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40352>
2026-03-13 14:52:41 +00:00
Rob Clark
f5d40636cd freedreno/drm: Fix bo_flush race
Once we've dropped the lock, we need to be referring to our own
temporary reference.

Fixes: 7b02bc6139 ("freedreno/drm: Drop fd_bo_fence")
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40352>
2026-03-13 14:52:41 +00:00
Rob Clark
395a5c2470 ir3: Move shader upload under variants_lock
Otherwise there is a race condition between the variant creation and
upload (when a shader is shared between contexts) where the variant
has been created, but not yet uploaded.

Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40352>
2026-03-13 14:52:41 +00:00
Mike Blumenkrantz
3264adf863 mesa/st/samplerview: explicitly block releasing in-use samplerviews
st_texture_set_sampler_view() currently allows only one samplerview for
a given texobj per context. in a scenario where the same texobj is
bound multiple times with different samplerviews (e.g., SRGB) for the
same draw like

samplerviews[] = {view0, view1}

then st_texture_set_sampler_view() will release view0 while creating view1
before either view is actually set to the driver, and then the driver will explode

this is gross, but the best solution which avoids infinite memory ballooning
from bufferview offsets is to pass through the array of views during creation
to ensure that the cache doesn't try to prune a view it just created

caught by Left 4 Dead 2

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/15045

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40353>
2026-03-13 13:55:42 +00:00
Mike Blumenkrantz
c186023e51 mesa/st/sampler_view: eliminate st_sampler_view::srgb_skip_decode
this prevents matching existing samplerviews when instead the existing
samplerviews can just match formats

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40353>
2026-03-13 13:55:42 +00:00
Mike Blumenkrantz
64dd6bf8aa mesa/st/sampler_view: use a local variable for texture sv format
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40353>
2026-03-13 13:55:42 +00:00
Mike Blumenkrantz
8fce32191e mesa/st/sampler_view: use a local variable for buffer sv format
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40353>
2026-03-13 13:55:41 +00:00
Mike Blumenkrantz
22ed7c8230 mesa/st: make st_texture_get_current_sampler_view static
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40353>
2026-03-13 13:55:41 +00:00
Icenowy Zheng
514e0d7de7 glsl: support adding point size to io_lowered shaders
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Currently the fixed function vertex shader is built as io_lowered
shaders; however the gl_nir_add_point_size() function currently expects
the original shader to be not io_lowered, and this function is called to
lower the fixed function vertex shader.

Add support for adding point size store_output intrinsics for io_lowered
shaders.

This fixes fixed function rendering on Zink with a Vulkan driver w/o
VK_KHR_maintence5.

Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40373>
2026-03-13 11:44:31 +00:00
Radu Costas
d089947266 pco: Commonize atomic sync operations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Replace loop with macros
Rewrite channel op to multi channel select to avoid extra swizzle

Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Signed-off-by: Radu Costas <radu.costas@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40320>
2026-03-13 13:06:11 +02:00
Ryan Zhang
93b58064f7 panvk/csf: use DEFERRED_FLUSH for fragment job cache flush
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The correct dependence is cs_flush_caches.cs_defer.signal to
signal cs_sync32_set.cs_defer.wait in occulusion query path.

Fixes: 443ddac ("panvk/csf: merge v10 and v11 paths in
issue_fragment_jobs")

Fixed: many random fail cases in VK-GL-CTS 1.4.4.2, eg.
dEQP-VK.query_pool.occlusion_query.get_results_conservative
_size_64_wait_query_without_availability_draw_points_clear_color

Signed-off-by: Ryan Zhang <ryan.zhang@nxp.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40368>
2026-03-13 16:49:16 +08:00
Georg Lehmann
cadc74b5e2 nir/search_helpers: assume float sources without preserve flag can't be inf/nan
For example, this should let us avoid needing one pattern with is_a_number
and one with nnan.

Foz-DB Navi48:
Totals from 3564 (3.11% of 114655) affected shaders:
Instrs: 8256755 -> 8255042 (-0.02%); split: -0.02%, +0.00%
CodeSize: 43143184 -> 43123192 (-0.05%); split: -0.05%, +0.00%
VGPRs: 268252 -> 268240 (-0.00%)
Latency: 218890225 -> 218881157 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 31044516 -> 31042297 (-0.01%); split: -0.01%, +0.00%
VClause: 96074 -> 96067 (-0.01%); split: -0.01%, +0.00%
SClause: 218042 -> 218037 (-0.00%); split: -0.00%, +0.00%
Copies: 508677 -> 508661 (-0.00%); split: -0.01%, +0.01%
Branches: 148570 -> 148569 (-0.00%)
PreSGPRs: 228110 -> 228082 (-0.01%); split: -0.01%, +0.00%
PreVGPRs: 231996 -> 231982 (-0.01%)
VALU: 4516327 -> 4515321 (-0.02%); split: -0.02%, +0.00%
SALU: 1353696 -> 1353590 (-0.01%); split: -0.01%, +0.00%
VMEM: 182189 -> 182179 (-0.01%)
SMEM: 344771 -> 344756 (-0.00%)
VOPD: 29463 -> 29438 (-0.08%)

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40291>
2026-03-13 07:13:10 +00:00
Georg Lehmann
19fa9bd152 nir/tests: test algebraic patterns with maximum fp_math_ctrl
This means we don't run into undefined behavior when testing nan/inf inputs.
Also make sure that patterns using is_only_used_as_float are signed zero correct.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40291>
2026-03-13 07:13:10 +00:00
Georg Lehmann
72c5272004 ntt: set precise correctly for comparisons/min/max
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40291>
2026-03-13 07:13:10 +00:00
Georg Lehmann
aad2b9bfc7 nir/opt_algebraic: be more strict when optimizing fcmp(a + #b, #c)
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40291>
2026-03-13 07:13:10 +00:00
Georg Lehmann
45345de2bb glsl: make flt/fge/fabs/fneg inf preserving
More bandaid for infinity tests.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40291>
2026-03-13 07:13:10 +00:00
Georg Lehmann
0b51ed736d glsl: reset fp_math_ctrl when changing it per alu
I missed that the fp_math_ctrl is otherwise only reset at the next assignment.
What a strange IR.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40291>
2026-03-13 07:13:09 +00:00
Georg Lehmann
624313d35d nir/opt_algebraic: lower ninf fisfinite correctly
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40291>
2026-03-13 07:13:09 +00:00
Georg Lehmann
87081a73c9 ac/nir/cull: make fisfinite nan/inf preserving
Otherwise, it's meaningless.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40291>
2026-03-13 07:13:09 +00:00
Georg Lehmann
15eadc1253 nir/lower_frexp: preserve fp_math_ctrl
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40291>
2026-03-13 07:13:09 +00:00
Marek Olšák
e1b20bb883 meson.build: require python 3.10, try python3.12
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
The commit created a problem on RHEL 9 where python 3.9 is the default,
which doesn't support the match keyword used by the commit.

Python 3.12 can be installed as another option, but then another problem
shows up that RHEL 9 lacks recent enough python3-mako that works with 3.12
(or at least that's my understanding of the issue), so we don't know yet
whether Mesa is even buildable on that.

Fixes: f2bb6103 - "vulkan/cmd_queue: Rework copy codegen"

Reviewed-by: Eric Engestrom <eric@igalia.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40305>
2026-03-13 03:20:10 +00:00
Lorenzo Rossi
45e28bd784 mailmap: Update my email
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40377>
2026-03-12 23:36:00 +00:00
Lorenzo Rossi
52ee0fe9e6 people: Update my email
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40377>
2026-03-12 23:36:00 +00:00
Lorenzo Rossi
7fc6af99ea pan: Remove dead code for sso_abi builder and fixed_varyings
Now that the SSO ABI is never used we can remove it with all of the
plumbing code required to find the fixed varyings bits.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
a06b15f761 panfrost: Switch to compact varyings layout
Now that everything is using the new layout to emit descriptors we can
switch to the compact ABI.  Even without mediump lowering this should
still offer increased performance for separate shaders, it also unifies
OpenGL and Vulkan code paths.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
f9819925ca panfrost/docs: Document varyings
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
51f8bf028b pan/compiler: Remove auto32 quirk
Midforst no longer uses auto32, we can hopefully remove the quirk and
never think about it again.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
3b8a87cbe7 pan/compiler: Mostly remove auto32 varting store
Using explicit types makes the code more easier to reason about, there
is only one edge-case where we still need varying stores but it should
be removed soon.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
9f8beb3bd5 pan/compiler: Remove unused descriptor info
After switching to the new layout we do not need most of the old
varyings info code, remove it.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
c76c237687 pan/compiler: Remove collect_varyings
Every compiler is now using varyings_layout, we can remove the old
nir_collect_varyings and live happily ever after.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
5518549708 panfrost/val: Emit varying descriptors based on the VS varying layout
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
0c4d2c8722 panfrost/bi: Emit varying descriptors based on the VS varying layout
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
70398866a1 panfrost: Refine names in pan_cmdstream descriptor functions
pan_cmdstream handles code common to both JM and CSF,
while valhall v9 didn't use CSF yet, they already used the
new version of the descriptor.
This lead to conditional compilation of various function with
similar names.
This commit renames some version-specific descriptor code to have
a versioned name, either `bi` (bifrost), `mid` (midfrost) or `val`
(valhall), to help with code comprehension.

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
8f27ff3235 pan/compiler: Dont build ABI automatically
Now that all compilers manually build the right ABI we can stop
automatically building the SSO ABI when we need it.  Still keep
some assertions to avoid headaches in the future

Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
8924ecf474 panfrost: Build explicit varying layout
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
1ea08a05d0 panvk: Cleanup shaders linking
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Faith Ekstrand
dfc05286b9 panvk: Use a new, more compact varying layout
Co-authored-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Faith Ekstrand
6b08260731 pan: Add a helper for generating more compact varying layouts
Thewe new layouts actually take advantage of mediump to save on I/O
bandwidth, instead of focusing just on data types in the shader.  Using
them requires that the driver use the varying layout for emitting any
needed varying descriptors.

Co-authored-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Faith Ekstrand
0f0a3225a5 panvk: Pass the varying layout from the VS to the FS compile
Co-authored-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Faith Ekstrand
0c8307d249 pan/bi: Handle varying layout mismatches in emit_load_vary()
If we're going to use the varying layout from the VS for the FS then we
need to be able to handle minor mismatches.  Mostly, this just means we
need to drop the assert that the set of locations matches 1:1.  We'll
use the byte offsets from the varying layout when we have one but keep
using the resource handles the driver put in driver_location for
LD_VAR[_IMM].

Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
06d3c739c7 panvk/jm: Emit varying descriptors based on the VS varying layout
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Faith Ekstrand
33cd22cd8c panvk/csf: Emit varying descriptors based on the VS varying layout
Co-authored-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
264ef3a6fa pan/compiler: Add formats to varyings info
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Faith Ekstrand
c995376a22 panvk: Build the VS varying layout early
We also store it in the shader variant so that we can get at it from the
API side or from other shader stage compiles.

Co-authored-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Lorenzo Rossi
47c55105c8 panvk: Constant fold location in panvk_lower_nir_io
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Signed-off-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Faith Ekstrand
aad690fd9a panvk: Compile shaders in pipeline stage order
Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00
Faith Ekstrand
6f11a4028f panvk: Scrape noperspective varyings out of the FS first
We want to flip the order in which we compile shaders and go in pipeline
stage order.  In order to do that and continue to bake in noperspective
varyings, we need to scrape them out of the FS as a separate step.
Fortunately, that's now easy and safe to do.

Reviewed-by: Lorenzo Rossi <lorenzo.rossi@collabora.com>
Acked-by: Eric R. Smith <eric.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38681>
2026-03-12 22:59:14 +00:00