Commit graph

177262 commits

Author SHA1 Message Date
José Roberto de Souza
4c06c736c5 intel/isl: Remove unknown workaround
The way this workaround is implemented, it is being applied to all
gfx 12 platforms(TGL, ADL, RKL, RPL, DG1, DG2 and MTL) but it was
supposed to be fixed in TGL B0.
Unfortunately I did not found any workaround number that would match it.

But as all released platforms don't ship to customers with revision == 0
this workaround was never being applied and can be safely removed.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24699>
2023-08-15 18:47:36 +00:00
Faith Ekstrand
b64da56b1a nir: s/nir_instr_ssa_def/nir_instr_def/
Generated by sed:

    sed -i -e 's/nir_instr_ssa_def/nir_instr_def/g' src/**/*.h src/**/*.c src/**/*.cpp

Suggested-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24703>
2023-08-15 17:44:27 +00:00
Faith Ekstrand
43be4129d2 nir: s/live_ssa_def/live_def/
Generated mostly with sed:

    sed -i -e 's/live_ssa_def/live_def/g' src/compiler/nir/nir.h src/compiler/nir/*.c

Plus three fixups in various Intel drivers.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24703>
2023-08-15 17:44:27 +00:00
Faith Ekstrand
b781dd6200 nir s/nir_get_ssa_scalar/nir_get_scalar/
Generated with sed:

    sed -i -e 's/nir_get_ssa_scalar/nir_get_scalar/g' src/**/*.h src/**/*.c src/**/*.cpp

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24703>
2023-08-15 17:44:27 +00:00
Faith Ekstrand
65b6ac8aa4 nir: Rename nir_instr_type_ssa_undef to nir_instr_type_undef
We already renamed the type, we just need to rename the enum and the
casting helper functions.

Generated with sed:

    sed -i -e 's/nir_instr_type_ssa_undef/nir_instr_type_undef/g' src/**/*.h src/**/*.c src/**/*.cpp
    sed -i -e 's/nir_instr_as_ssa_undef/nir_instr_as_undef/g' src/**/*.h src/**/*.c src/**/*.cpp

and two tiny whitespace fixups in lima.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24703>
2023-08-15 17:44:27 +00:00
Mike Blumenkrantz
252bff0f48 zink: use real A8_UNORM when possible
this is tricky because drivers are exposing their native support, but
that support may not fit the specific needs of the format

as such, (almost) every use of format where alpha emulation workarounds are
present now need to add a second layer of workarounds in order to handle
the case of possibly-genuine A8 (which might also be emulated A8 even if
the driver supports A8 for some things)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>
2023-08-15 16:42:27 +00:00
Mike Blumenkrantz
f501f9453a zink: use maintenance5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>
2023-08-15 16:42:27 +00:00
Mike Blumenkrantz
8be6b7caa3 zink: add maintenance extensions to profile
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>
2023-08-15 16:42:27 +00:00
Mike Blumenkrantz
d19e8fc1fb zink: split create_ici to init and eval
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>
2023-08-15 16:42:27 +00:00
Mike Blumenkrantz
4f8561369e zink: remove unused param from create_ici
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24685>
2023-08-15 16:42:27 +00:00
Alyssa Rosenzweig
eff5e18714 nir: Assert that nir_ssa_for_src components matches
In prep for removing the helper.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24654>
2023-08-15 11:59:03 -04:00
Alyssa Rosenzweig
8552311343 broadcom/compiler: Use nir_trim_vector explicitly
...when trying to ignore components. Trim functionality with nir_ssa_for_src is
deprecated.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24654>
2023-08-15 11:59:03 -04:00
Alyssa Rosenzweig
c182ab2b83 lvp,nir/lower_input_attachments: Use nir_trim_vector
Make the trimming obvious. We will lock down ssa_for_src soon.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24654>
2023-08-15 11:59:03 -04:00
Mike Blumenkrantz
88d753631c aux/trace: print bindless handles as pointers
this makes traces using bindless ops easier to read/diff

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24679>
2023-08-15 14:36:38 +00:00
Alyssa Rosenzweig
823827a295 panfrost: Pack stride at CSO create time on v9
Now that the stride is in the CSO, there's no merging needed at draw-time. The
whole descriptor could probably be uploaded at CSO create time but I didn't want
to deal with that right now, this isn't even my driver anymore I just like
deleting code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24680>
2023-08-15 13:27:58 +00:00
Sylvain Munaut
32675a304b mesa: Enable ARB_texture_border_clamp in GL Core
According to the GL3 spec, only the `CLAMP` mode was deprecated,
the `CLAMP_TO_EDGE` and `CLAMP_TO_BORDER_ARB` are not, so this
extension should be advertised.

As a side note, Davinci Resolve uses a Core profile and tests for
that extension so it fixes an issue with that app.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24660>
2023-08-15 12:46:56 +00:00
Mike Blumenkrantz
714362b7da zink: ci updates
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:06 +00:00
Mike Blumenkrantz
bc5ba7b7c4 zink: remove pipe_stream_output from function params
this is no longer used at all

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:06 +00:00
Mike Blumenkrantz
3c7f50ba4d zink: stop using pipe_stream_output
nir_xfb_info is much cleaner and simpler to use

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:06 +00:00
Mike Blumenkrantz
1abd507049 zink: delete all the extra gross xfb handling
xfb outputs should always be inlined into the base variables now,
so there's no need for anything further here

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:06 +00:00
Mike Blumenkrantz
01d3c691a5 zink: fix clip/cull dist xfb inlining
these are compact arrays which don't take up slots according to normal
array i/o sizing rules

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:06 +00:00
Mike Blumenkrantz
235ae7c3c6 zink: delete lower_64bit_vertex_attribs pass
this is no longer useful

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:06 +00:00
Mike Blumenkrantz
25fd1dfca3 zink: delete split_blocks pass
this is no longer useful

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:06 +00:00
Mike Blumenkrantz
f8cb0d8a44 ntt: handle interp intrinsics as derefs
this fixes usage_mask gathering for fs inputs

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:05 +00:00
Mike Blumenkrantz
aedebb9d30 zink: stop lowering indirect derefs
this is no longer necessary

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:05 +00:00
Mike Blumenkrantz
9e42553ca8 zink: use lowered io (kinda) for i/o vars
this runs io lowering on shader create, which is a huge pita
and waste of time since it requires then re-creating all the deref io later,
but it also makes the variables simpler by eliminating struct awfulness
(which was already eliminated by the split_blocks pass, but who's keeping
track) and will enable future use of some bizarro inter-stage linker thing

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:05 +00:00
Mike Blumenkrantz
0156058a3b zink: add a mode param to find_var_with_location_frac
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:05 +00:00
Mike Blumenkrantz
b0e4ecc032 zink: move fragcolor lowering further along the compile process
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:05 +00:00
Mike Blumenkrantz
df238e8fc0 nir/zink: fix gs emulation xfb_info sizing
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24634>
2023-08-15 11:54:05 +00:00
David Heidelberg
fa5ebfbeb9 ci/freedreno: document another a530 flake batch
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24694>
2023-08-15 11:20:34 +00:00
Rhys Perry
c9b177db0e aco: don't create sendmsg(dealloc_vgprs) if scratch is used
LLVM does something similar: https://reviews.llvm.org/D153295

fossil-db (gfx1100):
Totals from 21 (0.02% of 133461) affected shaders:
Instrs: 147428 -> 147396 (-0.02%)
CodeSize: 797188 -> 797060 (-0.02%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 2930317cea ("aco/gfx11: deallocate VGPRs at the end of the shader")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24669>
2023-08-15 11:00:31 +00:00
Konstantin Seurer
a02b5138a7 radv/rt: Rename traversal_shader to traversal_shader_addr
It's more in line with shader_addr and uniform_shader_addr as well as
the user data name.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23565>
2023-08-15 11:11:16 +02:00
Konstantin Seurer
c291f612cb radv/rt: Rename shader_pc and next_shader
The names basically had the same meaning. Changing them to
uniform_shader_addr and shader_addr makes it clear, that
uniform_shader_addr is the jump target and shader_addr is the next
shader executed by this invocation.

The next_ prefix is dropped since both are input and output variables.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23565>
2023-08-15 11:11:16 +02:00
Italo Nicola
2edf222abd egl: reenable partial redraw with a warning when using gallium hud
Partial revert of e516a0a94f ("egl: disable partial redraw when gallium
hud is active").

We shouldn't change the behavior of the application when the hud is
enabled, doing so could make it harder do diagnose issues. Instead, now
we warn and ask the user to manually disable the extension if he
considers it to be worth it.

Fixes: e516a0a94f ("egl: disable partial redraw when gallium hud is active")
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23456>
2023-08-15 08:18:52 +00:00
Vinson Lee
d0f4333fca intel/decoder: Fix memory leak on error path
Fix defect reported by Coverity Scan.

Resource leak (RESOURCE_LEAK)
leaked_storage: Variable text_data going out of scope leaks the storage it points to.

Fixes: b4c8d2dc45 ("intel/decoder: Add intel_spec_load_common()")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24659>
2023-08-14 23:42:58 -07:00
Paul Gofman
6a2a36d7dd driconf: add a workaround for Captain Lycop: Invasion of the Heters
CC: mesa-stable

Tested-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24639>
2023-08-15 04:38:09 +00:00
Mike Blumenkrantz
210fe9f586 zink: drop CWE requirement for renderpass tracking with primgen queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
2023-08-15 01:31:42 +00:00
Mike Blumenkrantz
1bff8ade88 zink: rip out some awkward parts of the old non-cwe path
this is no longer used

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
2023-08-15 01:31:42 +00:00
Mike Blumenkrantz
5536030735 zink: rework rast-discard for primgen queries
I originally used CWE for this case since it nicely avoids a lot of the
"complex" operations while still disabling most effects of a fragment shader

in theory, however, there are some cases where CWE isn't quite the same as actually
disabling the fs, so this adds a new rast-discard mode that can be used for
those cases

it can also be used instead of the dummy surface handling that was previously
used for drivers/hw that didn't support primitivesGeneratedQueryWithRasterizerDiscard,
which enables a bunch of gross conditionals to be simplified

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
2023-08-15 01:31:42 +00:00
Mike Blumenkrantz
4f743df4f0 zink: unset primgen suspended flag when ending a primgen query
this otherwise could result in rast-discard being permanently enabled
in certain corner cases

Fixes: 7f956435a0 ("zink: rework xfb queries for drivers with poor primgen support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
2023-08-15 01:31:41 +00:00
Mike Blumenkrantz
5ea5318e60 zink: require EDS1 for CWE usage
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
2023-08-15 01:31:41 +00:00
Mike Blumenkrantz
69cacebd29 zink: track start/stop of a couple query types
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24676>
2023-08-15 01:31:41 +00:00
Faith Ekstrand
da5ca7529f gallivm: Drop the Vulkan YUV format hacks
Vulkan is now using the raw formats so we don't need this hack.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
2023-08-14 23:44:19 +00:00
Mohamed Ahmed
4accbb27a2 vulkan/format: Translate G8B8G8R8_422_UNORM and B8G8R8G8_422_UNORM properly
They were being translated to YUYV and UYVY formats which, in
PIPE_FORMAT parlance, are auto-converted formats, not raw data
formats.  Use the raw data formats like everything else.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
2023-08-14 23:44:19 +00:00
Faith Ekstrand
eb23ce91b5 vulkan/format: Use correct swizzle for 1-plane YCbCr formats
VK_FORMAT_G8B8G8R8_422_UNORM and VK_FORMAT_B8G8R8G8_422_UNORM already
place the luminance channel in the green component which is where we NIR
lowering code for ycbcr expects it.  Set an RGBA swizzle in the common
format table and make it the driver's responsibility to re-map the
formats as needed for their hardware.

The only Vulkan drivers affected by this change are the Intel drivers
and lavapipe.  None of NVK, RADV, and v3dv support these formats yet and
Turnip has its own lowering that doesn't rely on the YCbCr format table
in util/vk_format.c.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
2023-08-14 23:44:19 +00:00
Faith Ekstrand
b9870275b1 anv: Disable CCS_E for ISL_FORMAT_YCRCB_*
We're about to start using YCRCB_NORMAL and YCRCB_SWAPUV for 8-bit
interleaved YCbCr and, while ISL claims CCS_E support, it's not well
tested and we don't think it's working yet for all of ANV's use-cases.
Disable it for now in ANV and only for YUV formats.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
2023-08-14 23:44:19 +00:00
Faith Ekstrand
0e33bb56a4 blorp: Use R8G8_UINT for YCRCB_* formats with CCS
BLORP uses the get_ccs_compatible_copy_format() based on whether or not
ISL claims the format supports CCS_E, not whether or not CCS_E is used
on the image.  This is probably a good thing as it improves consistency.
However, it means that we need CCS-compatible formats for YCRCB_*
formats even if we never use them with CCS_E enabled.  In practice,
these do actually seem to work according to the Vulkan CTS but coverage
is likely far less than perfect.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
2023-08-14 23:44:19 +00:00
Faith Ekstrand
3fff38f624 gallivm: Support G8B8_G8R8_422_UNORM and B8G8_R8G8_422_UNORM
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
2023-08-14 23:44:19 +00:00
Mohamed Ahmed
0c03d44093 util/format: Add G8B8_G8R8_422_UNORM and B8G8_R8G8_422_UNORM formats
These actually match the Vulkan format enums for single-plane YCbCr
formats, unlike the other PIPE_FORMAT_* enums which put luminance in the
red channel.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
2023-08-14 23:44:19 +00:00
Faith Ekstrand
9a6ec6cdd6 util/format: 8-bit interleaved YUV formats are UNORM
Without this, gallivm doesn't know what to do with the result data of a
texture fetch.  We have a bunch of gallivm code to handle these but, as
far as I can tell, none of it works properly without channel types.  The
YUYV texturing helpers all consume a 32-bit packed value, unpack it,
shuffle things as needed, and then re-pack into a 32-bit RGBA value,
trusting later code to unpack that as 8-bit UNORM.  For the raw formats,
this unpacking never happens.

What saves us is that I also don't think any of this code is ever used.
LLVMpipe supports the actual YUYV formats and we don't use the gallium
lowering pass which lowers to the raw formats.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24619>
2023-08-14 23:44:19 +00:00