Commit graph

181107 commits

Author SHA1 Message Date
Samuel Pitoiset
ab34603115 radv: disable TC-compatible HTILE on Tonga and Iceland
According to RadeonSI, TC-compat HTILE have issues on Tonga/Iceland
(first GFX8 chips) and a bunch of games seem to have issues.

Let's disable it instead of using a feature that is known broken.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7101
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3894
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26204>
2023-11-23 12:55:47 +00:00
Timothy Arceri
1b7107efe4 glsl: drop ir_binop_ubo_load
This was missed in e566b54a59

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26330>
2023-11-22 22:17:17 +00:00
Sil Vilerino
9528d050a4 d3d12: fix usage of GetAdapterLuid() in mingw/GCC using ABI helper
Fixes: e7204d0224 ("d3d12: Allow creating d3d12_dxcore_screen from existing ID3D12Device")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26338>
2023-11-22 21:41:52 +00:00
Iván Briano
43cb4cb6dd anv: use the right vertexOffset on CmdDrawMultiIndexed
Fixes: c70ef757e6 ("anv: Use extended parameters on Gen11+")

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26327>
2023-11-22 13:11:34 -08:00
Alexander von Gluck IV
bb0ad6f0f5 egl/haiku: Remove some dead cleanup code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26322>
2023-11-22 19:38:59 +00:00
Alexander von Gluck IV
c9e33f3545 hgl: Redefine visual options in hgl_context.h
* For now, move the visual mask flags into hgl_context.h
* This removes an un-needed dependency on GLView.h from glvnd
* Eventually, these need converted into normal EGL parameters

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26322>
2023-11-22 19:38:59 +00:00
Alexander von Gluck IV
af90199fd8 egl/haiku: Cleanup includes; minor build fix
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26322>
2023-11-22 19:38:59 +00:00
Marek Olšák
2f0ed0680c glsl/nir: return failure from link_varyings if there is a linker error
Some linker errors are set very deep inside link_varyings. Don't return
a success if we can't continue.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26310>
2023-11-22 18:49:52 +00:00
Marek Olšák
a141b52641 st/mesa: disable light_twoside if back faces are culled
This potentially improves performance.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26308>
2023-11-22 18:18:29 +00:00
Sagar Ghuge
2d3f0a834a anv: Add comment to copy image code block
Anybody will be tempted to factor out the if-else block code since it
looks like duplication but else block actually handles the ycbcr images
where the aspect masks are compatible but don't need to be the same.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26294>
2023-11-22 17:42:43 +00:00
David Rosca
73d69ef1e6 util/rbsp: Fill bits twice if reading more than 16 bits
vl_rbsp_fillbits may fill less than 32 bits if it removes emulation
prevention bytes, but will fill at least 16 bits. We need to call it
twice when reading more than 16 bits.

This fixes parsing H264 SPS packed header in va frontend when emulation
prevention bytes are at position where 32 bit values are read.

Cc: mesa-stable

Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26276>
2023-11-22 13:04:06 +00:00
Zhang Ning
db208af967 lima: Support parameter queries for PIPE_RESOURCE_PARAM_NPLANES
use helper to get lima_resource
and support PIPE_RESOURCE_PARAM_NPLANES

Signed-off-by: Zhang Ning <zhangn1985@outlook.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26311>
2023-11-22 12:42:16 +00:00
Daniel Schürmann
3b10547e67 aco: enable helper lanes if shader->info.fs.require_full_quads
This enables helper invocations also for lowered quad group operations.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26026>
2023-11-22 11:32:53 +01:00
Daniel Schürmann
f1110576d9 nir: add info.fs.require_full_quads
This flag indicates the requirement of helper invocations
in fragment shaders, independent from any present instructions.
This fixes the lowering of OpGroupNonUniformQuad* instructions.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26026>
2023-11-22 11:31:52 +01:00
Daniel Schürmann
2db0507b5d nir/gather_info: add missing wide subgroup operations
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26026>
2023-11-22 11:31:46 +01:00
Daniel Schürmann
1179d83a89 nir: remove info.fs.needs_all_helper_invocations
Use info.uses_wide_subgroup_intrinsics instead.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26026>
2023-11-22 11:31:11 +01:00
Samuel Pitoiset
f39ed0063b radv/ci: add missing expected failures for mesh queries on VANGOGH
Forgot to add them.

Fixes: b975d4e800 ("radv: enable meshShaderQueries on GFX10.3")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26331>
2023-11-22 08:35:54 +01:00
Tapani Pälli
d3e3c30d36 anv: implement Wa_18020335297
Set some state and implement dummy draws whenever viewport pointer
is being reprogrammed.

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/25987>
2023-11-22 05:23:12 +00:00
Tapani Pälli
418299c120 anv: refactor state emission
Add a helper that only emits hw_state, this makes it easier to modify
dirty state and call helper to emit only wanted state.

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/25987>
2023-11-22 05:23:12 +00:00
Tapani Pälli
4031443a4a iris: implement Wa_18020335297
Set some state and implement dummy draws whenever viewport pointer
is being reprogrammed.

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/25987>
2023-11-22 05:23:12 +00:00
Thomas H.P. Andersen
73317bb706 nvk: use nvk_pipeline_zalloc
3b3b157961 removed setting the pipeline type
assuming that it was already set by nvk_pipeline_zalloc. That helper was
not actually being used, so this patch updates it to do so.

This does not fix anything as the NVK_PIPELINE_GRAPHICS = 0 anyway, so it
is just a code cleanup.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26329>
2023-11-22 04:19:35 +00:00
Qiang Yu
90dc83fc9f radeonsi: add missing args in spi_ps_input_ena when fbfetch output
Fixes dEQP tests which uses fbfetch output when using ACO.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26298>
2023-11-22 02:55:37 +00:00
Mary Guillemard
5b45304624 nvk: Implement VK_EXT_primitives_generated_query
Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26324>
2023-11-21 23:50:41 +00:00
Mary Guillemard
7bda83bdfc nvk: Disable flush on each queries and flush at the end
VTG_PRIMITIVES_OUT (VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT) seems to
always require a FLUSH_PENDING_WRITES.

This changes the behavior of every queries to ensure that we only flush
during end query.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26324>
2023-11-21 23:50:41 +00:00
Sylvain Munaut
0fa85b983f mesa/st, dri2, wgl, glx: Restore flush_objects interop backward compat
In commit 1396dc1c a new output field was added as a parameter, but this
is a problem since the signature of the function are not versionned.

The flush function didn't have a versionned output struct. So what I'm
proposing here is that if the version of the input argument is new enough
(bumped to 2 here), then we re-use the existing argument, which until now
was directly a pointer to GLsync, and instead use it as a pointer to a
versioned struct.

We're just changing one pointer type to another, so in C, this should
be fine AFAIK.

Fixes: 1396dc1c

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26315>
2023-11-21 23:15:32 +00:00
Alyssa Rosenzweig
76b751c3b1 mesa/st: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:36 +00:00
Alyssa Rosenzweig
0abf4af443 mesa/st: collapse tgsi deadcode
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
301f57a17c gallium: drop pipe_shader_state_from_nir
It is a bad api and now unused.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
2e56be8e34 panfrost: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
e84302f763 nouveau: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: M Henning <drawoc@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
de1245417a zink: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
8d6f4427d2 vc4: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
4698eb3875 asahi: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
f205406264 v3d: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
dfa60b70e6 radeonsi: use pipe_shader_from_nir
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Alyssa Rosenzweig
645ba24e7b gallium: add pipe_shader_from_nir helper
useful for nir-based gallium meta, we have a tgsi equivalent already.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26272>
2023-11-21 20:14:35 +00:00
Thomas H.P. Andersen
5ec6dcce5f docs: update nvk extensions
I compared the output of vulkaninfo with this list. These are enabled in
the driver but missing here.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26319>
2023-11-21 19:55:52 +00:00
Jesse Natalie
ea5925461b microsoft/compiler: Fix lower_mem_access_bit_size callback result
When given (e.g.) 3x 16-bit components to store on a device that
isn't  using native 16-bit loads and stores, we should be lowering
that into one 32-bit store and one masked store. Instead, the logic
here ends up returning that the best we can do is one 8-byte store,
which is clearly wrong. Stores should round down, loads should
round up.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26293>
2023-11-21 19:11:40 +00:00
Jesse Natalie
c69ca8c5c1 nir_lower_mem_access_bit_sizes: Fix assert (bit -> byte size)
Reviewed-By: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26293>
2023-11-21 19:11:40 +00:00
Faith Ekstrand
81387ed131 nvk/codegen: Fragment shader builtins are noperspective
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26321>
2023-11-21 18:55:25 +00:00
Faith Ekstrand
354cf99869 nak: gl_FragCoord and gl_PointCoord are screen-space interpolated
This matches what the NVIDIA proprietary driver does.  It also fixes
rendering corruptions in Grand Theft Auto 3.

Fixes: c47488341e ("nak: Use load_interpolated_input for frag_coord")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10156
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26321>
2023-11-21 18:55:25 +00:00
Caio Oliveira
e8220b9319 intel/compiler: Simplify allocation of NIR related arrays
Those are not reused, so this will be the first and only allocation, so
no need to use the "realloc" variants.

For the fs_reg arrays, there's currently no particular reason to keep
them uninitialized, so zero-initialize them too -- not ideal but better
than random values.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26302>
2023-11-21 18:31:05 +00:00
Georg Lehmann
0a5d3ac8d2 aco/sched: treat p_dual_src_export_gfx11 like export
This prevents the scheduler from moving the dual source export above mrtz
export, which caused hangs.

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

Cc: mesa-stable
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26317>
2023-11-21 18:11:45 +00:00
Samuel Pitoiset
b975d4e800 radv: enable meshShaderQueries on GFX10.3
GFX11 support will come later.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
6c7265338d radv: add support for task shader invocations queries on GFX10.3
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
623b7033c5 radv: make some gang functions non-static
They will be used to create a gang CS when beginning a query if not
already present.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
1b3efecd56 radv: rework gfx10_copy_gds_query() slightly
To prepare for the same function with ACE.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
b7d668a819 radv: add support for mesh shader invocations queries on GFX10.3
Also emulated with a GDS atomic counter in shaders.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
48aabaf225 radv: do not harcode the pipeline stats mask for query resolves
Otherwise, mesh/task shader invocations would be ignored.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00
Samuel Pitoiset
272ad65397 radv: bump the pipeline state query size to 14 on GFX10.3
GFX10.3 doesn't natively support mesh/task shader invocations query
and they need to be emulated in shaders. In order to share more code
between GFX10.3 and GFX11, it's easier to use the same size as GFX11.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>
2023-11-21 15:24:49 +00:00