Alyssa Rosenzweig
1bf7d7139f
asahi: Set PIPE_CAP_SUPPORTED_PRIM_MODES
...
To lower GL_POLYGONS which we don't do natively. Fixes a pile of crashes in
Piglit.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20017 >
2022-12-01 05:58:30 +00:00
Jason Ekstrand
216e5d6e10
hasvk: Drop anv_nir_add_base_work_group_id()
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068 >
2022-12-01 04:56:48 +00:00
Jason Ekstrand
2806968af8
anv: Drop anv_nir_add_base_work_group_id()
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068 >
2022-12-01 04:56:48 +00:00
Jason Ekstrand
b4dd3df227
intel/nir: Set has_base_workgroup_id for lower_compute_system_values
...
This option didn't exist half a decade ago when I first implemented base
workgroup support in ANV. It's cleaner to just have split system values
like all the other zero_base+base things do.
We currently only do this for COMPUTE and not KERNEL because it lets us
avoid changing intel_clc for now. We can add KERNEL later if needed.
We also don't do this lowering for task/mesh.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068 >
2022-12-01 04:56:48 +00:00
Jason Ekstrand
19ad2629d0
hasvk: Implement lower_base_workgroup_id
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068 >
2022-12-01 04:56:48 +00:00
Jason Ekstrand
3c09571f67
anv: Implement lower_base_workgroup_id
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068 >
2022-12-01 04:56:48 +00:00
Jason Ekstrand
f2aee04d28
crocus: Lower load_base_workgroup_id to zero
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068 >
2022-12-01 04:56:48 +00:00
Jason Ekstrand
4abdecce22
iris: Lower load_base_workgroup_id to zero
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068 >
2022-12-01 04:56:48 +00:00
Jason Ekstrand
7d2e3f660c
intel/fs: Support load_workgroup_id_zero_base
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068 >
2022-12-01 04:56:48 +00:00
Jason Ekstrand
4fb33124c3
nir/divergence: Handle base_workgroup_id and workgrpu_id_zero_base
...
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20068 >
2022-12-01 04:56:48 +00:00
Bas Nieuwenhuizen
9a311a1891
radv: Remove the old LBVH shader.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19891 >
2022-12-01 02:20:48 +00:00
Bas Nieuwenhuizen
5ba950eb14
radv: Switch to new LBVH implementation.
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19891 >
2022-12-01 02:20:48 +00:00
Bas Nieuwenhuizen
ea159e47a5
radv: Add new LBVH shaders.
...
Contrary to the previous implementation, this actually implements an LBVH builder.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19891 >
2022-12-01 02:20:48 +00:00
Bas Nieuwenhuizen
f531f671ef
radv: Handle nodes with 2 invalid children in internal node converter.
...
Fixes: 682dc5c28e ("radv: Add conversion shader for internal nodes")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19891 >
2022-12-01 02:20:48 +00:00
Alyssa Rosenzweig
8e125b6c15
panfrost: Enable AFBC of more formats
...
Enable AFBC for all RGBA UNORM formats possible in v5. This does not
cover the AFBC rules for newer gens, nor for YUV.
Noticed with an uncompressed R8 UNORM texture in SuperTuxKart.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19758 >
2022-12-01 02:03:15 +00:00
Alyssa Rosenzweig
c7eb6a9fbb
panfrost: Enable AFBC of sRGB formats
...
AFBC of sRGB formats should just work. We just need to flip it on and enjoy
the improved performance.
In particular, this means that RGBA8 UNORM and RGBA8 sRGB UNORM are now
considered compatible formats for AFBC. That's a bug fix, because
GALLIUM_HUD use will act like a texture view between sRGB and linear
views. For FBOs, that will "just" result in a decompression, hurting
performance. For window system rendering with AFBC, that will cause an
assertion failure, as we cannot decompress SHARED resources.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19758 >
2022-12-01 02:03:15 +00:00
Alyssa Rosenzweig
8b7038ab3e
panfrost: Enable AFBC of cube maps
...
Missed by mistake. This is not the same as 3D AFBC, it's just like a 2D
array. Noted in a supertuxkart pandecode.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19758 >
2022-12-01 02:03:15 +00:00
Alyssa Rosenzweig
cd21cf5ab6
panfrost: Handle all RGB AFBC modes on v9
...
We're about to enable AFBC on more formats in the core AFBC code. The plane
descriptor packing needs to be aware of these new formats.
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19758 >
2022-12-01 02:03:15 +00:00
Georg Lehmann
a3beb82cf6
aco: Use wave size specific opcode for s_or in cube map coord code.
...
Cc: mesa-stable
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20041 >
2022-12-01 01:39:27 +00:00
Jason Ekstrand
0531630658
nir/builder: Also short-circuit for auto-generated nir_t2t<N>()
...
This makes nir_i2i32(b, x) behave exactly like nir_i2iN(b, x, 32) etc.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7787
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067 >
2022-12-01 01:10:12 +00:00
Jason Ekstrand
e67e2293fa
nir/builder: Rework the boolean conversion helpers
...
Move them up to where the other conversion helpers. For nir_b2<T>(),
suffix them with N like all the others and make them use
nir_type_convert() as well.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067 >
2022-12-01 01:10:12 +00:00
Jason Ekstrand
d9a24632d3
nir/builder: Drop nir_i2i and nir_u2u in favor of nir_x2xN
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067 >
2022-12-01 01:10:12 +00:00
Jason Ekstrand
ccf19e0956
nir/builder: Move conversions higher in nir_builder.h
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067 >
2022-12-01 01:10:12 +00:00
Jason Ekstrand
9a225415e3
nir/builder: Short-circuit in nir_type_convert if no conversion happens
...
If both types are the same or both are integer types with the same bit
size, no actual conversion happens and nir_type_conversion_op() will
return nir_op_mov. In this case, there's no point in emitting the move
and we can just return src instead.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067 >
2022-12-01 01:10:12 +00:00
Jason Ekstrand
c5fbcab803
nir/builder: Fix indentation of nir_type_convert
...
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Reviewed-by: Emma Anholt <emma@anholt.net >
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067 >
2022-12-01 01:10:12 +00:00
Jason Ekstrand
8a406fe055
nir: Fix builder usage in lower_mediump_vars()
...
In our handling of load_deref, we were calling builder helpers to create
conversions and then adjusting the destination bit size of the load. We
should adjust the bit size first because the builder sometimes looks at
the bit sizes of SSA values passed in as arguments.
Even though it's not strictly necessary, adjust the store_deref case as
well to make it fully symmetric with the load_deref case.
Reviewed-by: Emma Anholt <emma@anholt.net >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20067 >
2022-12-01 01:10:12 +00:00
Alyssa Rosenzweig
976405907e
pan/mdg: Emulate 8-bit with the 16-bit pipe
...
We don't care to support i8vec16, we just need a bit of 8-bit support to
implement format packing/unpacking in blend shaders. We're already doing
this by using the 16-bit pipe, we just need to commit to it all the way
-- reporting the correct sizes in max_bitsize_for_alu so the mask
packing logic works as intended -- and dropping the imov-specific hack
that was introduced to workaround a similar class of bugs.
With the previous patch, fixes:
dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.1
Fixes: 39e4b7279d ("pan/midg: Fix swizzling on 8-bit sources")
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19763 >
2022-12-01 00:52:53 +00:00
Alyssa Rosenzweig
261d48fc9b
pan/mdg: Refuse to schedule CSEL.vector to SMUL
...
Even if we only mask a single component from the result of CSEL.vector,
in our IR we treat its semantics as vector which causes trouble with
when scheduled to a scalar unit.
The problematic bundle looks like this:
vmul.MOV.i32 R31, TMP0.xxxx, R0.yzww
sadd.MAX.i32 TMP0.y, R0.y, #65408
smul.CSEL.vector.i32 R0.y, TMP0.y, #127
As the comment in midgard.h illuminates, these CSEL instructions are
actually operating per-bit, lining up with the all-1's booleans in
Midgard. The Bifrost analogue is MUX.i32.bit, not CSEL.i32. We should
probably rename the Midgard instruction to make that clear.
Anyhoo, on the scalar unit, CSEL/MUX operates on the bottom 32-bits of
its source. That's ok for the usual r31.w case, because that's secretly
replicating to its nonexistent register, I think? But that doesn't work
with the CSEL.vector (MUX.vector) form, because the condition it's
actually muxing on is r31.x, which here is R0.y, not the intended R0.x.
Rather than adding more special cases to the already overcomplicated
scheduler (for the dubious benefit of avoiding a small shaderdb
regression), just avoid scheduling CSEL.vector to smul.
With the next patch, fixes:
dEQP-GLES31.functional.draw_buffers_indexed.random.max_required_draw_buffers.1
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19763 >
2022-12-01 00:52:53 +00:00
Daniel Stone
921cfcf4c4
ci: Rebalance radv/grunt testing
...
We've recently rebalanced our lab devices to get a fewer number of
grunts. Switch to scheduling only on the newer shinier ones, running
fewer tests. We'll evaluate the runtime, and if they're quick enough
then we can increase the amount of testing we do.
Signed-off-by: Daniel Stone <daniels@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20081 >
2022-11-30 23:58:14 +00:00
Rajnesh Kanwal
24b1e3946c
pvr: Add support to submit occlusion query sub cmds.
...
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
1b87ba7c9c
pvr: Create a separate compute context for queries.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
3ea2f82169
pvr: Set isp userpass to dirty for secondary command buffers.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
224cfd772c
pvr: Process queries and emit write program when ending sub_cmd.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
952c1a55c8
pvr: Kick job and end sub_cmd if barrier_store is set in vkCmdExecuteCommands.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
5c34be4340
pvr: Process secondary buffer queries in vkCmdExecuteCommands.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
9df4be8cc4
pvr: Save error result in cmd_buffer state.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
b6e8e1cf37
pvr: Implement vkCmdCopyQueryPoolResults API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
0aa9f32b95
pvr: Implement vkCmdResetQueryPool API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
d69362ae84
pvr: Add support to generate query programs.
...
This commit adds support to generate three types of query related
programs. PVR_QUERY_TYPE_AVAILABILITY_WRITE allows to submit the
queries, PVR_QUERY_TYPE_RESET_QUERY_POOL allows to reset the pool
and PVR_QUERY_TYPE_COPY_QUERY_RESULTS is to copy the results.
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
963b696511
pvr: Add PVR_SUB_CMD_TYPE_OCCLUSION_QUERY type sub cmd.
...
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
b85ee36051
pvr: Create device specific compute query programs.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
68b8f80fb2
pvr: Implement vkCmdEndQuery API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
2b1992a000
pvr: Implement vkCmdBeginQuery API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
5055c182eb
pvr: Sequential dependency should be NONE for 0 constant shared regs.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
279c7c6d5a
pvr: Implement vkGetQueryPoolResults API.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
4fc2586efd
pvr: Add support to generate update compute kernel.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
9ac269fc7d
pvr: Add support to generate compute kernel to update shared regs.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Rajnesh Kanwal
e38273013b
pvr: Change CDM to compute, TA to geometry and 3D to fragment.
...
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com >
Reviewed-by: Frank Binns <frank.binns@imgtec.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19371 >
2022-11-30 22:45:41 +00:00
Gert Wollny
5b205ef413
r600: Store nir shaders serialized to save memory
...
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7247
Signed-off-by: Gert Wollny <gert.wollny@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20061 >
2022-11-30 20:31:57 +00:00
Georg Lehmann
22be0d09a0
aco: Don't prematurely emit s_andn2.
...
Split s_not + s_and allows more inverse comparision and s_cbranch_vccz
optimizations.
Foz-DB Navi21:
Totals from 516 (0.38% of 134913) affected shaders:
CodeSize: 7273724 -> 7273720 (-0.00%)
Instrs: 1364408 -> 1364407 (-0.00%)
Latency: 14604862 -> 14604858 (-0.00%)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19143 >
2022-11-30 18:25:15 +00:00