Commit graph

212972 commits

Author SHA1 Message Date
Connor Abbott
c2eb768eb2 tu: Expose VK_EXT_dynamic_rendering_unused_attachments
We only use attachment formats for things used by the pipeline, so we
can trivially enable this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37529>
2025-09-23 17:33:19 +00:00
Lionel Landwerlin
1d8847afcf anv: fix streamout config comparison
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: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: e76ed91d3f ("anv: switch over to runtime pipelines")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37251>
2025-09-23 16:01:30 +00:00
Lionel Landwerlin
8e93e7cd72 brw: layout patch in VUE in position independent way
Only if required. I somehow misunderstood that those would need to be
independent too, not just the vertex slots.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 8dee4813b0 ("brw: add ability to compute VUE map for separate tcs/tes")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37251>
2025-09-23 16:01:30 +00:00
Lionel Landwerlin
73383fe7ef brw: fix split_sends with txf combining
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/37527>
2025-09-23 15:37:40 +00:00
Lionel Landwerlin
6dbcc81c85 brw: simplify texture surface/sampler handle sources
We had twice surface/sampler sources for no good reason, just add a
boolean to tell whether they are bindless or not.

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/37527>
2025-09-23 15:37:40 +00:00
Lionel Landwerlin
06cf911ab4 brw: lower shader opcode into tex_instr
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/37527>
2025-09-23 15:37:40 +00:00
Lionel Landwerlin
bddfbe7fb1 brw/blorp: lower MCS fetching in NIR
One advantage here of moving a bunch of stuff to NIR is that we can
now have consistent payload types straight from the NIR conversion to
BRW.

This massively simplifies the BRW lowering code and avoids type errors
that are quite common to make in the backend.

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/37527>
2025-09-23 15:37:40 +00:00
Lionel Landwerlin
d4ab2087cf brw: lower non coherent FS load_output in NIR
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/37527>
2025-09-23 15:37:39 +00:00
Mike Blumenkrantz
3b6b03bd3b zink: convert task_payload offset to array index in prepass
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37528>
2025-09-23 10:56:50 -04:00
José Roberto de Souza
5a482a7a3d gallium/llvmpipe/test: Rename rsqrtf() to _rsqrtf()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Some versions of math.h exports rsqrtf() while others don't, so this
was causing compilation to fail when it is supported.
I have not found a easy way to detect if rsqrtf() is supported and
as this is only used in a llvmpipe tests it is not worthy do changes
in Meson files to detected if it is supported.

So here just renaming the Mesa function to _rsqrtf() and fixing the
build for both math.h versions.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13797
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12934
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37515>
2025-09-23 14:02:23 +00:00
Michel Dänzer
dd7ae41091 egl/gbm: Destroy excess BOs
Calculate the minimum available buffer age in addition to the maximum,
and if they differ for 1000 frames in a row, destroy the BO for the
highest-age unused buffer.

Without this, Wayland compositors using dynamic triple buffering always
get buffer age 3 once a third BO has been allocated.

v2:
* Rename function to destroy_oldest_unused_bo. (Marek Olšák)
* Move function call into if block.
* Use == instead of > as the condition for the function call.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37511>
2025-09-23 13:32:13 +00:00
Michel Dänzer
15b8d3ca43 egl/dri: Name struct dri2_egl_buffer
This will allow referencing it outside of struct dri2_egl_surface.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37511>
2025-09-23 13:32:13 +00:00
Danylo Piliaiev
fce9dbc493 tu/perfetto: Init perfetto datasources once
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37465>
2025-09-23 12:04:01 +00:00
Danylo Piliaiev
0621d5cd39 tu/perfetto: Make GPU clock sequence-scoped
When CPU clock is the same with the authoritative trace clock (normally
default to CLOCK_BOOTTIME), perfetto drops the non-monotonic snapshots
to ensure validity of the global source clock in the resolution graph.
When they are different, the clocks are marked invalid and the rest of
the clock syncs will fail during trace processing.

There's no central daemon emitting consistent snapshots for
synchronization between CPU and GPU clocks on behalf of renderstages and
counters producers. The sequence-scoped clock (64 <= ID < 128) is unique
per producer + writer pair within the tracing session.

Turnip is a bit tricky here, since clocks may be synchronized before
`tu_perfetto_end_submit` is called (in case of KGSL), but emission of
perfetto event has to happen on the same thread as other renderstage events.
To solve this I save the clocks in `tu_perfetto_state` and emit them in
`stage_end` when needed.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37465>
2025-09-23 12:04:01 +00:00
Danylo Piliaiev
09f5c9d0ad tu/perfetto: Track GPU timestamps per-device
In preparation for using sequence-scope perfetto clocks.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37465>
2025-09-23 12:04:01 +00:00
Danylo Piliaiev
e2b63472e4 tu/perfetto: Don't check sync_gpu_ts when emitting renderstage
In short, perfetto doesn't require the initial clock snapshot to be
earlier than the timestamp to be converted. So we don't have to do
complex handling for it.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37465>
2025-09-23 12:04:01 +00:00
Danylo Piliaiev
ea849b5557 tu: Destroy all mutexes used for device
We never destroyed most of mutexes we used, it was likely fine on
platforms turnip is running on, but still not correct.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37465>
2025-09-23 12:04:00 +00:00
Job Noorman
f536d76341 ir3/parser: don't use instr as ralloc context
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Instructions are allocated using a linear context so cannot themselves
be used as a ralloc context anymore. Use the variant's ir instead.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 114e6a3104 ("ir3: Use a linear allocation context for ir3_instructions.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37523>
2025-09-23 11:45:07 +00:00
Valentine Burley
e2e13f23a0 zink/ci: Re-enable ASan leak detection and drop VVL filter on CML
This job is stable again with the fix in c85168160e ("zink: reset batch
states on destroy")

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37519>
2025-09-23 10:56:31 +00:00
Danylo Piliaiev
518008c3b0 tu/a7xx: Update reg stomping info to fix GPU crashes when stomping
- Removed DBG/CHICKEN regs from being stomped, because they randomly
  cause issues, and there is no even point of stomping them.
- *ATTR_BUF_GMEM regs are not emitted at every renderpass.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37372>
2025-09-23 10:12:30 +00:00
Sergi Blanch Torne
51c3f56aa3 ci,crnm: migrate colorama to rich
The links in the console are broken depending on the console type; for example,
when it runs within a GitLab job. This can be improved using rich. But as we
have a dependency on colorama too, we can migrate all the coloring to use this
other library too.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37454>
2025-09-23 09:57:37 +00:00
Calder Young
a6b11b58d9 anv: Fix tiling for AV1 IntraBC surface on Gfx125+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes: 3c7a834e ("anv: Add support for AV1 video decoding on Gfx125 and Xe2")

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37352>
2025-09-23 07:48:42 +00:00
Pierre-Eric Pelloux-Prayer
81f3a5a035 nir/opcodes: remove invalid comment
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
"\b" is interpreted by python which results in an invalid char being
written to the C file.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37331>
2025-09-23 09:09:55 +02:00
Pierre-Eric Pelloux-Prayer
cc4b50b023 nir/opcodes: use u_overflow to fix incorrect checks
Operands of an addition will be promoted to int making the a+b<a
kind of checks ineffective.

Use u_overflow.h helpers to perform the check correctly.
The commit would be simpler if it used __typeof__ like so:

   util_add_check_overflow(__typeof__(src0), src0, src1)

But typeof only became a standard in C23 so this commit instead extends
nir_opcodes a bit to allow opcodes that need the dest_type to get it.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Dylan Baker <dylan.c.baker@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37331>
2025-09-23 09:09:55 +02:00
Pierre-Eric Pelloux-Prayer
1b23a2ba80 util, vulkan: use u_overflow.h
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37331>
2025-09-23 09:09:55 +02:00
Pierre-Eric Pelloux-Prayer
cfbf745a79 mesa: add u_overflow.h
It defines a couple of helpers to deal with signed and unsigned
integers overflow.

If __builtin_add_overflow (and others) intrinics are available
they're used, otherwise overflow checks are done manually.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37331>
2025-09-23 09:09:55 +02:00
Pierre-Eric Pelloux-Prayer
66aefea02b mesa: clear TransformFeedback.NumVarying on error
The memory is freed before trying to reallocate it.
If the alloc fails, NumVarying should be updated to 0.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37331>
2025-09-23 09:09:55 +02:00
Lionel Landwerlin
1110763d7b anv: avoid unnecessary 3DSTATE_PS_EXTRA emissions
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 44aaf88425 ("anv: rework gfx state emission (again)")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37472>
2025-09-23 06:52:38 +00:00
Lionel Landwerlin
ade4952d3c anv: fixup 3DSTATE_COARSE_PIXEL emission
We had 2 bits for 3DSTATE_CPS/3DSTATE_COARSE_PIXEL and during the
rework I merged them since we only need one (3DSTATE_CPS is pre-Xe3,
3DSTATE_COARSE_PIXEL Xe3+).

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 44aaf88425 ("anv: rework gfx state emission (again)")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13923
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37472>
2025-09-23 06:52:38 +00:00
Qiang Yu
c334ade0c2 gallium: fix eglExportDMABUFImageQueryMESA crash for r600
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
r600 does not implement pipe_screen.resource_get_param, so
dri2_resource_get_param just return false here.

eglExportDMABUFImageQueryMESA has been changed to support
multi plane resource, so some emulated multi plane format
gets here and return NULL which causes following queries
with this return value crash.

Fixes: f416a52960 ("egl: refine dma buf export to support multi plane")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13921
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37503>
2025-09-23 02:08:57 +00:00
Ian Romanick
3e04990c68 elk: Increase the size of some structure fields in combine_constants
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
In very large shaders, first_use_ip, last_use_ip, and even (register) nr
can overflow 16 bits. Increase the size of these fields.  Some structure
components are rearranged to promote better packing.

Fixes: 2dad1e3abd ("i965/fs: Add pass to combine immediates.")
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37482>
2025-09-22 20:02:25 +00:00
Ian Romanick
b7e1ac8309 brw: Increase the size of some structure fields in combine_constants
In very large shaders, first_use_ip, last_use_ip, and even (register) nr
can overflow 16 bits. Increase the size of these fields.
used_in_single_block is moved earlier in the structure to promote better
packing.

Fixes: 2dad1e3abd ("i965/fs: Add pass to combine immediates.")
Closes: #9489
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Tested-by: @joostruis
Tested-by: @Snoucher
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37482>
2025-09-22 20:02:25 +00:00
sarbes
2f99f95288 lima: wire up anisotropic filtering
v2:
- AF seems to be log2 based, so convert accordingly

v3:
- actually expose AF

v4:
- REALLY expose AF
- remove log2 modifier assert
- use log2 modifier
- rename AF field
- advertise AF support in features

Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37189>
2025-09-22 19:40:31 +00:00
Caleb Callaway
f3ef41ff28 compiler: document SPIR-V capture + replace
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36472>
2025-09-22 19:06:07 +00:00
Caleb Callaway
97b4a6d0e3 compiler: SPIR-V shader replacement
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36472>
2025-09-22 19:06:07 +00:00
Caleb Callaway
72a43c76c2 compiler: auto-stage file ext for SPIR-V capture
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36472>
2025-09-22 19:06:07 +00:00
Caleb Callaway
df2f7bda4f compiler: BLAKE3 ID for SPIR-V capture
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36472>
2025-09-22 19:06:07 +00:00
Caleb Callaway
16a855ae61 compiler: use PATH_MAX for SPIR-V capture filename
Reviewed-by: Natalie Vock <natalie.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36472>
2025-09-22 19:06:07 +00:00
Mike Blumenkrantz
9f893de953 hud: delete buffer refcounting
this otherwise leaks memory

Fixes: b3133e250e ("gallium: add pipe_context::resource_release to eliminate buffer refcounting")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37516>
2025-09-22 18:44:36 +00:00
Olivia Lee
729827878a panvk: fix FS driver set layout when LD_VAR_BUF is disabled
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We can't use shader->info.stage here because it is only initialized in
pan_shader_compile, which is called after nir_lower_descriptors. This
causes us to miss the index adjustment to make room for the varying
attributes when LD_VAR_BUF is disabled.

Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Fixes: 7b949dd8c4 ("panvk: Use LD_VAR_BUF[_IMM] when possible")
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37471>
2025-09-22 17:23:15 +00:00
Connor Abbott
a7922e7188 tu/fdm: Use better bounds for LRZ overallocation with FDM offset
Use tile_max_w/h which is the HW bound for the tile width/height and is
much smaller than the theoretical maximum width/height with a lopsided
tile with just the depth attachment.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37513>
2025-09-22 17:01:05 +00:00
Dylan Baker
0c11a9cfb3 meson: use the wayland module
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
This module has existed, unchanged, since Meson 0.64, and is now marked
as API stable in 1.8. It provides a number of helpers that reduce the
amount of code we need (including fiddly code about finding
wayland-scanner) by a bit, as well as some nice helpers for finding
external XML files.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35839>
2025-09-22 16:35:26 +00:00
Gurchetan Singh
943ac08280 gfxstream: determine page size based on guest properties too
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
blobAlignment helps with running a 4KB guest on a 16KB host.
But for 16KB guest on 4KB host, we'll need to check guest
size too.  os_get_page_size(..) might not work on all target
guest OSes now, so default to 4KB.

TEST=CF 16KB works

Reviewed-by: David Gilhooley <djgilhooley.gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37460>
2025-09-22 16:21:44 +00:00
Christian Gmeiner
0c6c1fa484 etnaviv: Implement hardware based streamout support
Add support for hardware-accelerated transform feedback using the TFB
command register to control capture state.

Maintains the hardware state through an enum distinguishing between
idle (no hardware state established), active (hardware currently
capturing), and paused (hardware stopped).

Hardware commands are emitted based on state transitions:
 - ENABLE when moving from idle to active
 - RESUME when transitioning from paused to active
 - DISABLE when stopping capture

Transform feedback buffer setup is using the existing dirty state
mechanism through ETNA_DIRTY_STREAMOUT_BUFS, while command emission uses
the new ETNA_DIRTY_STREAMOUT_CMD flag. Buffer descriptors are computed by
mapping vertex shader transform feedback outputs to fragment shader input
registers, as required by the hardware.

A 64-byte context buffer is allocated per context to maintain hardware
state isolation between applications using transform feedback
simultaneously. The hardware state persists across pause and resume
cycles within a command stream but resets during flushes since transform
feedback state does not survive command buffer boundaries.

The implementation enables the full transform feedback capability with
support for 4 buffers and up to 64 separate or interleaved components,
replacing the previous debug-only stub implementation.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37320>
2025-09-22 15:36:32 +00:00
Christian Gmeiner
52bc3c2d20 etnaviv: Implement stream output target management
Add infrastructure for stream output by implementing the required Gallium
interface functions for creating, destroying, and binding stream output targets.

This lays the groundwork for transform feedback support in etnaviv.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37320>
2025-09-22 15:36:32 +00:00
Christian Gmeiner
bdd9d8b13d etnaviv: Support PIPE_QUERY_PRIMITIVES_EMITTED
Add support for transform feedback primitive counting queries using the
hardware TFB query mechanism. The implementation uses dedicated query
registers (VIVS_TFB_QUERY_BUFFER and VIVS_TFB_QUERY_COMMAND) to track
the number of primitives written during transform feedback operations.

The hardware automatically accumulates primitive counts and stores the
final result at offset 0 of the query buffer, eliminating the need for
manual accumulation.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37320>
2025-09-22 15:36:31 +00:00
Christian Gmeiner
bbac6a8b53 etnaviv: Pass context to acc sample provider supports(..) function
Extend the supports(..) function signature in acc sample providers
to accept an etna_context parameter, enabling GPU feature validation
during query type support checks.

This change prepares the infrastructure for query providers to make
context-aware decisions based on available GPU capabilities.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37320>
2025-09-22 15:36:31 +00:00
Christian Gmeiner
ebd5504f73 etnaviv: Support hw based rasterizer_discard
Add native hardware support for rasterizer_discard on GPU cores that
support the HWTFB (Hardware Transform Feedback) feature. This moves
rasterizer discard handling from software clipping to dedicated
hardware state.

Passes all dEQP-GLES3.functional.rasterizer_discard.* with HWTFB.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37320>
2025-09-22 15:36:31 +00:00
Christian Gmeiner
53ff96a227 etnaviv: hwdb: Add HWTFB cap
Used to tell if the GPU core supports transform feedback.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37320>
2025-09-22 15:36:30 +00:00
Christian Gmeiner
9c806f9514 etnaviv: Update headers from rnndb
Update to rnndb commit 64f296c480d3

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37320>
2025-09-22 15:36:30 +00:00