Tapani Pälli
cb71030387
mesa: enable GL_EXT_conservative_depth extension
...
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33065 >
2025-01-30 10:50:37 +00:00
Marek Olšák
30211d0f4a
mesa: enable GL name reuse for virgl
...
I think we only have to disable it for Qemu.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33156 >
2025-01-29 06:22:42 +00:00
Tapani Pälli
e28f24fbf2
mesa/st: take pixelmaps in to account in drawpixels cache
...
Otherwise we might use cache item with different mapping.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12492
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33191 >
2025-01-28 08:50:51 +00:00
Marek Olšák
e7214b9446
glapi: rename exported symbols so as not to conflict with old libglapi
...
libwaffle 1.7.0 has a hack that dlopen's libglapi with RTLD_GLOBAL, which
was meant to preload libglapi, but with this MR it overwrites libgallium's
own symbols, which breaks libgallium.
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789 >
2025-01-23 00:49:05 +00:00
Marek Olšák
464dde302c
glapi: remove the remap table
...
it's unused now
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789 >
2025-01-23 00:49:05 +00:00
Marek Olšák
44bda7c258
dri: put shared-glapi into libgallium.*.so
...
so that we don't have to maintain a stable ABI for it.
This will allow removal of the remapping table to reduce CALL_* overhead
for GL dispatch tables.
Also we can now clean it up.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-by: Eric Engestrom <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32789 >
2025-01-23 00:49:05 +00:00
Marek Olšák
bdd85c8393
nir: remove handling IO variables from passes used by st/mesa
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146 >
2025-01-22 02:15:04 +00:00
Marek Olšák
2c5deaa98b
st/mesa: inline st_finalize_nir_before_variants
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146 >
2025-01-22 02:15:04 +00:00
Marek Olšák
000679b9bf
st/mesa: remove dead/no-op code due to IO being always lowered
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146 >
2025-01-22 02:15:04 +00:00
Marek Olšák
3e32ea3232
st/mesa: assert that all incoming shaders use lowered IO
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33146 >
2025-01-22 02:15:04 +00:00
Marek Olšák
43d3451fdb
mesa: switch fixed-func vertex program to IO intrinsics
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Acked-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33053 >
2025-01-21 19:38:54 +00:00
Marek Olšák
3290222a1a
st/mesa: move VS & TES output stores to the end before unlowering IO
...
required by vc4 & vc5
Acked-by: Iago Toral Quiroga <itoral@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33053 >
2025-01-21 19:38:54 +00:00
Mike Blumenkrantz
48d0a0322f
glsl: plumb num_views down to shader_info::view_mask
...
this is needed for drivers to more effectively compile multiview-enabled
shaders
Reviewed-by: Timothy Arceri <tarceri@itqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33016 >
2025-01-20 22:43:23 +00:00
Qiang Yu
6c95232069
gallium,mesa: remove uint surffix from pipe_caps
...
We use explicit type now, no need for these surffix to
indicate the implicit type of the fields.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955 >
2025-01-17 04:39:47 +00:00
Qiang Yu
e5041ef036
docs,src: replace doc and comments for PIPE_CAP with pipe_caps
...
Use command:
find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_CAP_\([A-Za-z0-9_]*\)/pipe_caps.\L\1/g' {} +
find . -type d \( -path "./.git" -o -path "./docs/relnotes" \) -prune -o -type f -exec sed -i 's/PIPE_CAPF_\([A-Za-z0-9_]*\)/pipe_caps.\L\1/g' {} +
With manual adjustment for docs/gallium/screen.rst to merge
pipe_cap and pipe_capf section.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955 >
2025-01-17 04:39:47 +00:00
Qiang Yu
45123ee4d5
gallium,mesa: replace get_paramf with pipe_caps access
...
With command:
find . -path "./.git" -prune -o -type f -exec sed -i ':a;N;$!ba;s/->get_paramf([^,]*,[[:space:]]*PIPE_CAPF_\([^)]*\))/->caps.\L\1/g' {} +
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955 >
2025-01-17 04:39:46 +00:00
Qiang Yu
ef0b6f8262
egl,gallium,gbm,mesa: replace get_param with pipe_caps access
...
Use command:
find . -path "./.git" -prune -o -type f -exec sed -i ':a;N;$!ba;s/->get_param([^,]*,[[:space:]]*PIPE_CAP_\([^)]*\))/->caps.\L\1/g' {} +
And some manual adjustment.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955 >
2025-01-17 04:39:46 +00:00
Qiang Yu
b2caa48ec9
mesa/st: enable extension use pipe_caps access
...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32955 >
2025-01-17 04:39:46 +00:00
Marek Olšák
842c91300f
mesa: enable GL name reuse by default for all drivers except virgl
...
v2: detect qemu, crossvm
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com > (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32715 >
2025-01-11 05:54:52 +00:00
Marek Olšák
b15c8fe3f1
mesa: rework enablement of force_gl_names_reuse
...
force_gl_names_reuse is changed to integer.
-1 means default (currently disabled), 0 means disabled, 1 means enabled
The names reuse initialization is moved to _mesa_alloc_shared_state ->
_mesa_InitHashTable instead of _mesa_HashEnableNameReuse.
It will be enabled by default.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32715 >
2025-01-11 05:54:52 +00:00
Mike Blumenkrantz
a5c3c452b8
mesa: use default params for clearbuffer functions
...
this might otherwise pull in user-specified params
from the unpack buffer and access arbitrary data
cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32945 >
2025-01-09 15:48:10 +00:00
Marek Olšák
9f08c8bd0f
mesa: switch fixed-func fragment program to IO intrinsics
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32913 >
2025-01-07 01:52:01 +00:00
Marek Olšák
9a1775dd33
mesa: switch ARB_vp/fp to IO intrinsics
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32911 >
2025-01-07 00:31:08 +00:00
Marek Olšák
d09ba36f98
glsl: fix corruption due to blake3 hash not being set for nir_opt_undef
...
NIR is generated sooner, so we need to set it sooner.
This fixes Viewperf13/CATIA_car_04.
Fixes: cbfc225e2b
- glsl: switch to a full nir based linker
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32876 >
2025-01-06 19:50:51 +00:00
Marek Olšák
49897f99d6
st/mesa: recompute IO bases for ARB_vp/fp
...
This is a prerequisite for generating lowered IO for ARB_vp/fp.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
da8f98d202
st/mesa: don't use nir_copy_var
...
so that we don't have to call nir_lower_var_copies.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
4fdeeca192
st/mesa: switch st_nir_make_clearcolor_shader to IO intrinsics
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
b1c63365fc
st/mesa: switch PBO create_fs to IO intrinsics
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
1c56dbdaaf
st/mesa: switch st_pbo_create_vs and st_pbo_create_gs to IO intrinsics
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
eeea99210f
st/mesa: switch st_nir_make_passthrough_shader to IO intrinsics
...
also simplify it to only make VS because it's only used for VS.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
ec68f0492b
st/mesa: switch GL_SELECT shader to IO intrinsics
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
2807259a18
st/mesa: switch Z/S DrawPixels shaders to IO intrinsics
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
135c9fa7b6
st/mesa: unlower IO for internal shaders if needed
...
This will be required because all internal shaders will be converted
to IO intrinsics.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
7e39045733
st/mesa: switch ATI_fs to IO intrinsics
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
40848ba97e
st/mesa: use IO intrinsics in st_nir_lower_position_invariant
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
02b7396568
st/mesa: use IO intrinsics in st_nir_lower_fog
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
a408c0aa2b
st/mesa: run DCE before st_unlower_io_to_vars
...
Some lowering passes can leave dead code behind, but dead IO intrinsics
are still counted as enabled IO, which breaks things.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
3f7911e7d3
st/mesa: fold st_translate_prog_to_nir into prog_to_nir
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
49f737bc14
mesa: remove unused PROGRAM_WRITE_ONLY
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:18 +00:00
Marek Olšák
14956aa0f2
mesa: remove unused PROGRAM_SYSTEM_VALUE
...
ARB_vp/fp don't have system values.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32779 >
2025-01-06 19:09:17 +00:00
Marek Olšák
dae57e184a
glsl,st/mesa: always lower IO for GLSL, unlower IO for drivers
...
This enables nir_opt_varyings for all gallium drivers.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942 >
2024-12-24 05:54:07 -05:00
Marek Olšák
1dc85a34f3
st/mesa: add a pass that unlowers IO intrinsics to variables
...
We are going to switch all gallium drivers to nir_opt_varyings and then
use this to get IO variables in the end.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31942 >
2024-12-24 05:54:07 -05:00
Marek Olšák
1e14b00e8b
gallium: pass XFB primitive mode to set_stream_output_targets
...
radeonsi would like to know the prim mode. GL always knows it,
so let's pass it through.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685 >
2024-12-20 08:22:52 +00:00
Marek Olšák
e22b78a196
mesa: fix printing _NEW_* flags
...
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685 >
2024-12-20 08:22:52 +00:00
Marek Olšák
b2ddf85591
mesa: set correct XFB prim mode for draw validation after resuming XFB
...
Draws were validated against an XFB primitive type from the last
glBeginTransformFeedback call, ignoring glResumeTransformFeedback that
may have been after it that may have resumed for a different primitive
type.
The spec doesn't state this explicitly, but it's logical.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685 >
2024-12-20 08:22:52 +00:00
Marek Olšák
227f69716f
st/mesa: don't use nir_opt_fragdepth because it's incorrect with MSAA
...
Doing "gl_FragDepth = gl_FragCoord.z" with MSAA and without sample shading
changes per-sample depth testing to per-pixel depth testing, so we can't
eliminate it.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12079
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32685 >
2024-12-20 08:22:52 +00:00
Erik Faye-Lund
4a1dd45850
st/mesa: document ARB_texture_float quirk
...
We're not strictly speaking doing the right thing for ARB_texture_float,
but for a very good reason. This has come up a few times in the past, so
let's document the decision for future readers.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32404 >
2024-12-18 11:42:20 +00:00
Eric R. Smith
b81aefcc19
mesa: when blitting between formats clear any unused components
...
If the state tracker chooses to implement one format with a more
general one (e.g. GL_ALPHA implemented with GL_RGBA) we end up
in a situation where some components should be ignored. Readpix
handles this correctly, but blit does not, which means that if
we blit between different formats we can end up writing garbage
into some components. Work around this by adding an explicit
swizzle to the pipe_blit_info struct, which can re-arrange elements
and/or put 0 or 1 into appropriate channels, and use this to
set the appropriate values into unused channels via the sampler
view.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31378 >
2024-12-05 18:27:37 +00:00
Marek Olšák
1f69258fb4
st/mesa: replace EmitNoIndirectInput / EmitNoIndirectOutput with NIR options
...
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32423 >
2024-12-03 12:57:36 +00:00
Marek Olšák
7f4e36ff7d
gallium: replace PIPE_SHADER_CAP_INDIRECT_INPUT/OUTPUT_ADDR with NIR options
...
This is a prerequisite for enabling nir_opt_varyings for all gallium
drivers.
nir_lower_io_passes (called by the GLSL linker) only uses NIR options
to lower indirect IO access before lowering IO and calling
nir_opt_varyings.
Most drivers report full support for indirect IO and lower it themselves,
which prevents compaction of lowered indirectly accessed varyings because
nir_opt_varyings doesn't touch indirect varyings.
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io > (Rb for asahi)
Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com > (for r300)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32423 >
2024-12-03 12:57:36 +00:00