Commit graph

185841 commits

Author SHA1 Message Date
Rohan Garg
731ffa0737 anv, blorp: Set COMPUTE_WALKER Message SIMD field
Fixes: d95bbf35 ('anv: Set COMPUTE_WALKER Message SIMD field')
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27983>
2024-03-06 10:58:27 +00:00
Lionel Landwerlin
0de856ecef anv: fix companion command buffer initialization
Currently the command buffer is completely empty, which is not good.
There are a few of things that should be programmed, but we've
probably been okay due to the default engine initialization.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: edcde0679c ("anv: Add helper to create companion RCS command buffer")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27979>
2024-03-06 10:23:34 +00:00
Lionel Landwerlin
67c9f94b05 anv: delay internal shader upload to when needed
People reported an increase in device initialization affecting some
Android tests [1].

So delay the internal shader upload (similar to what we do for blorp
shaders, and what RADV seems to be doing too) until actually needed.

[1] : https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25361#note_2305129

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27946>
2024-03-06 09:58:53 +00:00
Patrick Lerda
11ce5b1a9f r300: enable R400 cos and sin hardware vertex shader opcodes
The R400 has working hardware opcodes for cos and sin at
the vertex shader level. This change enables these features.

This change was tested on an ATI R430 (0x554d).

Here is the shader-db summary:
total instructions in shared programs: 103863 -> 103552 (-0.30%)
instructions in affected programs: 5610 -> 5299 (-5.54%)
helped: 38
HURT: 24
total temps in shared programs: 16836 -> 16830 (-0.04%)
temps in affected programs: 42 -> 36 (-14.29%)
helped: 6
HURT: 0
total cycles in shared programs: 162448 -> 162139 (-0.19%)
cycles in affected programs: 5760 -> 5451 (-5.36%)
helped: 38
HURT: 24

LOST:   0
GAINED: 3

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10504
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27970>
2024-03-06 09:38:27 +00:00
Eric Engestrom
158e5882e9 ci/lavapipe: fold DEQP_VER: vk and drop .deqp-test-vk
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27936>
2024-03-06 08:54:11 +00:00
Eric Engestrom
54254ae3f2 ci/venus-lavapipe: drop unused DEQP_VER that's being overwritten by DEQP_SUITE anyway
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27936>
2024-03-06 08:54:11 +00:00
Samuel Pitoiset
4a2a261a79 radv: stop passing radv_cmd_buffer to draw functions with task shaders
In order to remove the ambiguity because for task shaders the driver
needs to emit to both the GFX CS and the ACE CS but all states come
from the main cmdbuf (ie. GFX) from the application point of view.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27819>
2024-03-06 08:24:39 +00:00
Samuel Pitoiset
c2288ad43d radv: allocate a 32-bit value for the MEC fw bug with indirect mesh+task earlier
This workaround will be removed soon but in order to pass only
radv_cmd_state+cs+ace_cs to the functions that draw with mesh+task, the
32-bit value needs to be allocated earlier.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27819>
2024-03-06 08:24:39 +00:00
Samuel Pitoiset
d18c50856a radv: refactor emitting the view index for task shaders
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27819>
2024-03-06 08:24:39 +00:00
Samuel Pitoiset
1f8cfb2b2e radv: always use ace_cs for the gang CS variable
For consistency.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27819>
2024-03-06 08:24:39 +00:00
qbojj
4b7f4724f8 vulkan: Fix calculation of flags in vk_graphics_pipeline_state_fill
Fixes: 2b62d90158 ("vk/graphics_state: Support VK_KHR_maintenance5")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10705
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27929>
2024-03-06 07:54:28 +00:00
Mark Janes
597c1c1c18 intel/dev: declare workarounds required by ATSM platforms
INTEL_PLATFORM_ATSM_G10 requires the same workarounds as INTEL_PLATFORM_DG2_G10
INTEL_PLATFORM_ATSM_G11 requires the same workarounds as INTEL_PLATFORM_DG2_G11

Closes: #10749
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27987>
2024-03-05 22:49:14 -08:00
Dave Airlie
ac391536eb nvk: only unmap heap bos that were mapped
Otherwise we munmap(0, size) and remove the cts binary maps

Also add an assert, though NULL is legal for munmap in theory,
nothing should be using it in practice on Linux.

Fixes: e6f137e9ed ("nvk: Only map heaps that explicitly request maps")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28006>
2024-03-06 15:20:25 +10:00
Faith Ekstrand
2feb3c6e30 nak: Support F2I for 8-bit integers on SM50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
Faith Ekstrand
11de561395 nak/sm50: Use OpBfe instead of OpBRev for nir_op_find_lsb
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
Faith Ekstrand
3d13d190e6 nak/sm50: Fix encoding of immediates in OpFFma
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
Faith Ekstrand
21de61b1ac nak: Fix printing of OpIsberd
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28000>
2024-03-06 03:20:10 +00:00
David Heidelberg
1316854e74 ci/intel: split asus-cx9400-volteer into acer-cp514-2h-11{30,60}g7-volteer
Cc: mesa-stable
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27877>
2024-03-06 01:52:49 +00:00
David Heidelberg
861c123ba0 ci/intel: move machine definition to the intel-tgl-skqp job
Cc: mesa-stable
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27877>
2024-03-06 01:52:49 +00:00
David Heidelberg
f9ba492647 ci/intel: add acer-cp514-2h-11{30,60}g7-volteer
Originally asus-cx9400-volteer, but now we can choose machine regarding
to available CPU within.

Cc: mesa-stable
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27877>
2024-03-06 01:52:49 +00:00
David Heidelberg
ed73137d35 ci/intel: decompose anv-tgl-test so we can specify custom devices for TGL
No functional changes.

Cc: mesa-stable
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27877>
2024-03-06 01:52:49 +00:00
Felix DeGrood
a2bd99f521 driconf: add SotTR DX12 to Intel XeSS workaround
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27610>
2024-03-06 01:12:54 +00:00
Jesse Natalie
9c4c1796d7 d3d12: Point sprite lowering pass needs to handle arrays
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27999>
2024-03-06 00:54:31 +00:00
Jesse Natalie
788c106ea1 wgl: Initialize DEVMODE struct
Otherwise the dmDriverExtra field might be uninitialized and have a nonzero
value, which can cause the API implementation to smash the stack when copying
to the output struct.

Cc: mesa-stable
Reviewed-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27998>
2024-03-06 00:33:58 +00:00
Faith Ekstrand
d1cf01dc52 vulkan/pipeline: Always init pipeline cache objects
vk_shader_init_cache_obj() is fast enough and the already-found case is
rare enough that there's no good reason to avoid the init.  This allows
us to use vk_shader_unref instead of vk_shader_destroy which is probably
a touch safer over-all.  It also fixes the assert that the two shaders
have matching keys.

Fixes: bb8b11d806 ("vulkan/pipeline: Handle fully compiled library shaders properly")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10752
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27993>
2024-03-05 23:12:34 +00:00
Timur Kristóf
def0c275c4 aco: Eliminate SCC copies when possible.
Foz-DB Navi31:
Totals from 2517 (3.22% of 78112) affected shaders:
Instrs: 5992126 -> 5972611 (-0.33%); split: -0.33%, +0.00%
CodeSize: 30986404 -> 30914536 (-0.23%); split: -0.23%, +0.00%
Latency: 43221112 -> 43217422 (-0.01%); split: -0.02%, +0.01%
InvThroughput: 6675983 -> 6674598 (-0.02%); split: -0.02%, +0.00%
SClause: 181987 -> 181976 (-0.01%); split: -0.01%, +0.00%
Copies: 538852 -> 519419 (-3.61%)

Co-authored-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27072>
2024-03-05 22:51:01 +00:00
Mike Blumenkrantz
9a53e3b1fd nvk: bump NVK_PUSH_MAX_SYNCS to 256
technically this needs to be MUCH higher since there's no limitation
on the number of semaphore waits that can be submitted, but this is
enough to handle zink usage

fixes KHR-GL46.sparse_buffer_tests.BufferStorageTest

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27992>
2024-03-05 22:34:58 +00:00
Jesse Natalie
ba17f5ca6a microsoft/compiler: Remove code after discard/terminate in later optimization steps
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27996>
2024-03-05 21:40:09 +00:00
Chia-I Wu
3d4dfae7eb aco: fix nir_op_pack_32_4x8 handling
I started seeing

  ACO ERROR:
      In file ../src/amd/compiler/aco_validate.cpp:98
      Operand and Definition types do not match:  s1: %44 = p_parallelcopy %158
  test_basic: ../src/amd/compiler/aco_interface.cpp:85: void validate(aco::Program*):
      Assertion `is_valid' failed.

since commit 52ee4cf229 ("nir/builder: Teach nir_pack_bits and
nir_unpack_bits about 32_4x8").

Fixes: e0d232c2fc ("aco: implement nir_op_pack_32_4x8").  I
Suggested-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27972>
2024-03-05 20:38:34 +00:00
Georg Lehmann
482137402a aco/ssa_elimination: check if pseudo scratch reg overwrittes regs used for v_cmpx opt
Cc: mesa-stable

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27855>
2024-03-05 20:16:21 +00:00
Georg Lehmann
e7d6cd9216 aco/post-ra: track pseudo scratch sgpr/scc clobber
Foz-DB Navi31:
Totals from 1439 (1.84% of 78112) affected shaders:
Instrs: 1994854 -> 1996650 (+0.09%)
CodeSize: 11376864 -> 11383384 (+0.06%)
Latency: 14996299 -> 14999317 (+0.02%); split: -0.00%, +0.02%
InvThroughput: 2061294 -> 2061518 (+0.01%); split: -0.00%, +0.01%

Cc: mesa-stable

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27855>
2024-03-05 20:16:21 +00:00
Georg Lehmann
1eb067ee9f aco: store if pseudo instr needs scratch reg
Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27855>
2024-03-05 20:16:21 +00:00
Georg Lehmann
bd93e8372d aco/post-ra: assume scc is going to be overwritten by phis at end of blocks
Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27855>
2024-03-05 20:16:21 +00:00
Georg Lehmann
a5056b2f93 aco/post-ra: rename overwritten_subdword to allow additional uses
Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27855>
2024-03-05 20:16:21 +00:00
Georg Lehmann
b0554ab0a1 aco: create pseudo instructions with correct struct
Cc: mesa-stable
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27855>
2024-03-05 20:16:21 +00:00
Job Noorman
8d0f9c8fcd ir3: fix returning false instead of NULL
Fixes: 9de628b65c ("ir3: fold and/or and negations into branches")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27986>
2024-03-05 19:50:32 +00:00
Job Noorman
9cfc44532b ir3: fix freeing incorrect register in loops
While processing loop back edges, current live defs were freed through
their def pointer instead of correctly using get_def(). This may cause
the wrong register being freed when the current live def was reloaded.

Fixes: 21cd9b9557 ("ir3: implement RA for predicate registers")
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27986>
2024-03-05 19:50:32 +00:00
Yonggang Luo
1e97fded47 vulkan/runtime: Mark vk_default_dynamic_graphics_state to be private
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27526>
2024-03-05 19:05:00 +00:00
Yonggang Luo
2f57834d27 freedreno/vulkan: Use vk_dynamic_graphics_state_init instead of direct assignment
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27526>
2024-03-05 19:05:00 +00:00
Yonggang Luo
db103c56ab treewide: Remove vulkan/runtime vulkan/util prefix in include path
This is for unify the include style of shared vulkan headers

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27526>
2024-03-05 19:05:00 +00:00
Mike Blumenkrantz
ea9d87bf75 zink: call CmdSetRasterizationStreamEXT when using shader objects
required by spec

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27990>
2024-03-05 18:41:44 +00:00
Mike Blumenkrantz
0736c212b5 zink: fix PIPE_CAP_MAX_SHADER_PATCH_VARYINGS
maxTessellationControlPerPatchOutputComponents is the per-patch limit,
maxTessellationControlPerVertexOutputComponents is the per-vertex limit

fixes #10750

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27990>
2024-03-05 18:41:44 +00:00
Friedrich Vock
4c05ebf3a5 radv: Set SCRATCH_EN for RT pipelines based on dynamic stack size
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27899>
2024-03-05 18:15:00 +00:00
Mike Blumenkrantz
ac4e60b9c9 lavapipe bump descriptor buffer address space limits
lavapipe is the only driver that advertises the spec minimum, which is
stupidly small

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27989>
2024-03-05 17:43:53 +00:00
Rob Clark
850267ef99 freedreno/a6xx: Add dual_color_blend_by_location
Needed by unigine heaven.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27969>
2024-03-05 16:53:29 +00:00
Rohan Garg
c82edb4e8f anv: drop duplicated 3DSTATE_SLICE_TABLE_STATE_POINTERS emission
Signed-off-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27985>
2024-03-05 15:49:41 +00:00
Georg Lehmann
1d8b2b159e nir/divergence_analysis: fix subgroup mask
These depend on the subgroup invocation id, so they are divergent.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

Fixes: df86c5ffb3 ("nir: add divergence analysis pass.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27962>
2024-03-05 14:52:17 +00:00
Georg Lehmann
230743da2e nir: remove rotate scope
All other subgroup operations do not have a scope in NIR, so for consistency
rotate shouldn't have one either.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27964>
2024-03-05 14:12:21 +00:00
Kenneth Graunke
edf14f4b7c intel/brw: Unindent code after previous change
I kept things indented in the previous patch to make the diffs easier to
read, but there's no reason to continue doing so.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27959>
2024-03-05 12:03:31 +00:00
Kenneth Graunke
4c10613625 intel/brw: Remove SIMD lowering to a larger SIMD size
On Gfx4, we had to emulate SIMD8 texturing with SIMD16 for some message
types.  This ceased to be a thing with Gfx5 and hasn't come up again.

So, we can simply assert that we are truly "SIMD splitting", and assume
that the lowered size is smaller than the original instruction size.
This avoids some mental complexity as we can always think of the split
instructions as taking apart, operating on, and recombining subsets of
the original values.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27959>
2024-03-05 12:03:31 +00:00