Jesse Natalie
161a90abbd
dzn: Add a driconf option to disable dzn for specific apps and use it for RDR2
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531 >
2024-02-13 17:53:42 +00:00
Jesse Natalie
660c7fe6a7
dzn: Fix tessellation shader insertion into PSO desc
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531 >
2024-02-13 17:53:42 +00:00
Jesse Natalie
d5131e5f86
dzn: Simultaneous-access is mutually exclusive with MSAA
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531 >
2024-02-13 17:53:42 +00:00
Jesse Natalie
32c6caffd7
spirv2dxil: Trivial fixes for tessellation shaders
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531 >
2024-02-13 17:53:42 +00:00
Jesse Natalie
a3c45306e2
spirv2dxil: Remove dead branches early during shader compilation
...
Apparently spiregg can produce not-taken branches that somehow try
to access textures that aren't actually declared. These branches
need to be trimmed before any texture lowering is done.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531 >
2024-02-13 17:53:42 +00:00
Jesse Natalie
a8758afabd
microsoft/compiler: Relax assert for SPIR-V barriers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27531 >
2024-02-13 17:53:42 +00:00
Erik Faye-Lund
b6b980a904
mesa/main: work around chrome/firefox bug
...
Due to flawed logic, Chromium and Firefox thinks EXT_texture_storage
allows using GL_BGRA8_EXT for *all* texturing, including things like
glTexSubImage2D, which it does not.
However, this bug was introduced in Chromium back in 2016, and there's
also a lot of Electron apps that bundle outdated versions of Chromium.
This means it's going to be a *mess* to fix this properly while staying
within the spec.
I've opened a ticket with Khronos to consider changing the spec to make
this legal, because it seems most other OpenGL implementations allow it.
But in the mean time, let's complain a bit, but accept the behavior.
This way people can at least run browsers with hardware acceleration
again. If we decide to change the spec, we can remove this wording.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10550
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27521 >
2024-02-13 17:08:27 +00:00
Erik Faye-Lund
d0cc0e74dd
mesa/main: mark GL_BGRA8_EXT as color-renderable
...
While this is not quite as clear as in the previous commit, I still
believe this is the case, but in a bit of an indirect way:
1. EXT_texture_storage defines that GL_BGRA8_EXT is allowed to be used
in certain sitations if *either* EXT_texture_format_BGRA8888 *or*
APPLE_texture_format_BGRA8888 is supported.
2. Surprisingly, EXT_texture_format_BGRA8888 (which we do support) does
not even mention GL_BGRA8_EXT, only GL_BGRA_EXT.
3. APPLE_texture_format_BGRA8888 on the other hand (which we *don't*
support) *does* introduce GL_BGRA8_EXT, and is pretty clear about it
being intended for rendering-purposes. But it's written against GLES
1.1 instead of GLES 2 or later, so it doesn't explicitly add it to
the required tables.
I think the above tells us that GL_BGRA8_EXT is *supposed* to be a
color-renderable format, even if the way we currently support it is
rather underspecified.
It should also be texture-filterable, for the same reason as in the
previous commit.
In the longer run, we should probably add support for
APPLE_texture_format_BGRA8888, which would make things a bit clearer.
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27521 >
2024-02-13 17:08:27 +00:00
Erik Faye-Lund
2b2a6a238e
mesa/main: mark GL_BGRA as color-renderable
...
The EXT_texture_format_BGRA8888-spec is quite clear that this format is
color-renderable, so let's mark it properly as such.
It should also be texture-filterable, because in the version of OpenGL
ES it was written against all texture-formats were filterable to begin
with.
While we're at it, use the non-EXT version of the enum; it's been in the
headers since OpenGL 1.2...
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27521 >
2024-02-13 17:08:27 +00:00
Erik Faye-Lund
a7e8dc6835
mesa/main: fix _mesa_base_tex_format for BGRA
...
This function needs the GLES fix for all APIs now. And it should also
handle the sized internal format.
Fixes: 4de62731f4 ("mesa/main: add support for EXT_texture_storage")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27521 >
2024-02-13 17:08:27 +00:00
Mike Blumenkrantz
b7e39657f6
zink: only add arrays to indirect non-tcs variables
...
these are already sized accurately
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27534 >
2024-02-13 16:13:13 +00:00
Mike Blumenkrantz
9e2c7314f2
nir/lower_io: fix handling for compact arrays with indirect derefs
...
this logic relies on constant indexing for compact arrays, but this is
frequently not the case for compact array builtins (e.g., gl_TessLevelOuter).
the usual strategy of lowering to temps isn't viable in TCS, which means
io lowering has to be able to handle indirect access to these builtins
without crashing
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27534 >
2024-02-13 16:13:13 +00:00
José Roberto de Souza
d0fba810b3
intel: Fix intel_get_mesh_urb_config()
...
The round up in 'next_address_8kb = DIV_ROUND_UP(push_constant_kb, 8)'
was not decreasing the amount of URB available for Mesh and Task, what
could cause an over allocation of URB.
There was also no minimum entries enforcement for Mesh and Task, what
could cause 0 r.mesh_entries to be set in a case where tue_size_dw is
90% > than mue_size_dw. Same for r.task_entries when Task is enabled.
Also adding a few more asserts to help debug.
This fixes at least dEQP-VK.mesh_shader.ext.properties.mesh_payload_size
in LNL but it has potential to fixes other Mesh tests as well.
Cc: mesa-stable
Signed-off-by: José Roberto de Souza <jose.souza@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27555 >
2024-02-13 15:06:32 +00:00
Samuel Pitoiset
32c1e45718
radv: fix emitting VS prologs for merged shaders compiled separately on GFX10+
...
RSRC1 isn't equal to the VS RSRC1 and both config registers need to
be re-emitted.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27574 >
2024-02-13 14:01:42 +00:00
Samuel Pitoiset
6762307698
radv: cleanup radv_shader_combine_cfg_vs_tcs()
...
To match radv_shader_combine_cfg_vs_gs().
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27574 >
2024-02-13 14:01:42 +00:00
Georg Lehmann
6121497228
aco/gfx11+: limit hard clauses to 32 instructions
...
https://github.com/llvm/llvm-project/pull/81287
Foz-DB Navi31:
Totals from 406 (0.52% of 78112) affected shaders:
Instrs: 585342 -> 585750 (+0.07%)
CodeSize: 3077856 -> 3079456 (+0.05%); split: -0.00%, +0.05%
Latency: 3263165 -> 3263326 (+0.00%); split: -0.00%, +0.01%
InvThroughput: 664092 -> 664114 (+0.00%); split: -0.00%, +0.00%
VClause: 11143 -> 11537 (+3.54%)
SClause: 11878 -> 11884 (+0.05%)
Copies: 39807 -> 39815 (+0.02%)
Cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27569 >
2024-02-13 13:40:52 +00:00
Karol Herbst
3f7b344930
rusticl/mem: support GL_TEXTURE_BUFFER
...
Fixes: 2645003bdc ("rusticl: Create CL mem objects from GL")
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27385 >
2024-02-13 10:12:13 +00:00
Karol Herbst
117291332c
rusticl/mem: properly handle buffers
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10505
Fixes: 2645003bdc ("rusticl: Create CL mem objects from GL")
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27385 >
2024-02-13 10:12:13 +00:00
Karol Herbst
727cddd338
nir/lower_cl_images: record image_buffers and msaa_images
...
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com >
Reviewed-by: Jesse Natalie <jenatali@microsoft.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27385 >
2024-02-13 10:12:13 +00:00
Tapani Pälli
29a6beb36e
anv: revert cache flushing changes for indirect commands
...
This reverts commit d699600da1 .
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10600
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27591 >
2024-02-13 09:47:32 +00:00
Samuel Pitoiset
0c05bdf1c1
radv/ci: enable RADV_PERFTEST=shader_object on VEGA10
...
Renoir currently hangs in Mesa CI. Needs to be investigated.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27433 >
2024-02-13 09:14:21 +00:00
Samuel Pitoiset
bead3f2ec3
radv: allow RADV_PERFTEST=shader_object on GFX9/VEGA10
...
It's passing VKCTS on VEGA10 but for some reasons RENOIR currently
hangs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27433 >
2024-02-13 09:14:21 +00:00
Friedrich Vock
afab80bdb6
radv,driconf: Enable active AS leaf workaround for Jedi Survivor
...
Another game that can't get AS updates right.
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27590 >
2024-02-13 08:37:20 +00:00
Marek Olšák
14c85196fc
mesa: use util_idalloc_alloc_range for _mesa_HashFindFreeKeyBlock
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27588 >
2024-02-13 01:51:59 -05:00
Marek Olšák
ec65dfaabd
mesa: fix incorrect _mesa_HashInsertLocked parameter in _mesa_EndList
...
This fixes random behavior when we turn on GL names reuse for display lists.
(ctx->Const.ForceGLNamesReuse)
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27588 >
2024-02-13 01:51:59 -05:00
Marek Olšák
72a38b3792
st/mesa: remove !obj checking in _mesa_get_bufferobj_reference when it's useless
...
There is at least one case in a future commit where the compiler can't do
this automatically.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27587 >
2024-02-13 04:39:13 +00:00
Marek Olšák
9747cf2c8f
st/mesa: merge 3 unlikely blocks in _mesa_get_bufferobj_reference
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27587 >
2024-02-13 04:39:13 +00:00
Marek Olšák
bfe6d389a0
mesa: remove _mesa_HashTable::InDeleteAll
...
It's not necessary if we don't remove entries from the hash table,
which we don't have to do because we are going to destroy it anyway.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586 >
2024-02-13 03:53:27 +00:00
Marek Olšák
8ca750a8b6
mesa: fold _mesa_HashDeleteAll into _mesa_DeleteHashTable
...
They are always called back-to-back. This is simpler.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586 >
2024-02-13 03:53:27 +00:00
Marek Olšák
d33bffd708
mesa: re-format main/hash.h, move inlines to the end, some code to main/hash.c
...
the assertions also didn't do anything
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586 >
2024-02-13 03:53:26 +00:00
Marek Olšák
cf2692fa24
mesa: clean up unnecessary _mesa_HashTable locked/unlocked wrappers
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586 >
2024-02-13 03:53:26 +00:00
Marek Olšák
70b65fe09b
mesa: remove unused _mesa_HashTable code
...
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586 >
2024-02-13 03:53:26 +00:00
Marek Olšák
716e483cfb
util/idalloc: make deleting invalid IDs a no-op
...
This happens with piglit tests if we enable ForceGLNamesReuse
for everything.
Reviewed-by: Adam Jackson <ajax@redhat.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27586 >
2024-02-13 03:53:26 +00:00
Lionel Landwerlin
5438b19104
iris: enable generated indirect draws
...
This mirror the ring buffer mode we have in Anv.
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
d754ed5330
iris: add an option for not emit draw parameters
...
When we start generating indirect draws, we'll generate values ourself
and point the HW vertex buffer entries to right location from the
device.
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
96439b7dfb
iris: factor out index buffer emission
...
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/26797 >
2024-02-13 00:06:45 +00:00
Kenneth Graunke
1caf42d92e
iris: Implement INTEL_DEBUG=heaps
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
725817f429
iris: make URB programming available outside iris_state.c
...
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
84e1f8ae70
iris: make KSP helper available outside iris_state.c
...
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
bde1c76655
iris: make binding table shifting values available outside iris_state.c
...
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
f192ea630a
intel/shaders: enable gfx8 support
...
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
76c3d97c84
intel/shaders: add iris variant of indirect draws generation shader
...
Iris does not use Gfx11+ SGVS extended parameters, so we have to rely
on the old Gfx9 method of providing the parameters through vertex
buffers.
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
b52e25d3a8
anv: rewrite internal shaders using OpenCL
...
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
1e31fd5f42
meson: add option to install intel-clc
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
a26c7b0b03
intel/ds: new tracepoints for generated commands
...
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
472f49ef43
genxml: remove NDEBUG_UNUSED
...
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
41b2ed65e2
genxml: generate opencl packing headers
...
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
2a0328ba8b
genxml: enable opencl code generation
...
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
e6b5196079
intel-clc: print text input
...
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/26797 >
2024-02-13 00:06:45 +00:00
Lionel Landwerlin
4fd7495c69
intel/clc: add ability to output NIR
...
This will be used to generate a serialized NIR of functions for
internal shaders.
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/26797 >
2024-02-13 00:06:45 +00:00