Rhys Perry [Tue, 6 Jun 2023 11:02:02 +0000 (12:02 +0100)]
aco/tests: test that s_bfe bits is masked
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23464>
Rhys Perry [Tue, 6 Jun 2023 09:55:16 +0000 (10:55 +0100)]
aco: mask bits source of s_bfe
The s_bfe instructions use 7 bits, not 5 like the NIR opcode requires.
No fossil-db changes (navi21).
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9162
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23464>
Matt Coster [Fri, 24 Feb 2023 14:06:39 +0000 (14:06 +0000)]
pvr: Add support for sampler border colors
Currently only the six vulkan 1.0 pre-defined formats are supported,
but some basic infrastructure that will be useful for implementing
VK_EXT_custom_border_color (and vulkan 1.1) is included.
Only formats currently listed in the pvr_format_table in pvr_formats.c
are currently supported. Unlike most (all?) other drivers, the PowerVR
hardware requires each entry in the border color table to be encoded
for every hardware format (of which there are 128 available, plus 128
for compressed formats).
Also in this commit:
- Two new constants in rogue_texstate.xml:
- IMAGE_WORD0_TEXFORMAT_MAX_SIZE, and
- SAMPLER_BORDERCOLOR_INDEX_MAX_SIZE; and
- A new device feature (tpu_border_colour_enhanced)
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21555>
Matt Coster [Thu, 8 Jun 2023 09:32:15 +0000 (10:32 +0100)]
pvr: Declare dependency on idep_mesautil
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21555>
Christian Gmeiner [Wed, 7 Jun 2023 09:16:43 +0000 (11:16 +0200)]
etnaviv: make wider use of DBG_ENABLED(..)
Make the source code more consistent.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23495>
Andres Gomez [Wed, 7 Jun 2023 10:32:53 +0000 (12:32 +0200)]
.mailmap: add an alias for Christian Gmeiner
Signed-off-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23498>
Karmjit Mahil [Fri, 13 May 2022 10:53:53 +0000 (11:53 +0100)]
pvr: HWRT creation simplifications.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20092>
Gert Wollny [Wed, 31 May 2023 15:45:03 +0000 (17:45 +0200)]
r600/sfn: Don't rewrite TESS_EVAL inner tess level outputs
Fixes:
5cd3e3950 (r600/sfn: Make sure all components are usable when lowering TF inputs)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23518>
Gert Wollny [Wed, 31 May 2023 15:44:16 +0000 (17:44 +0200)]
r600/sfn: add read instruction for unused but required LDS op results
DS_XCHG_RET and LDS_CMP_XCHG_RET don't have a version that doesn't return
a value in the LDS red queue. so we have to read the value from the queue
and discard it.
Fixes:
79ca456b (r600/sfn: rewrite NIR backend)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23518>
Luigi Santivetti [Tue, 16 May 2023 13:36:24 +0000 (14:36 +0100)]
pvr: fixup assert in pvr_cmd_buffer_alloc_mem
Stop explicitly passing PVR_BO_ALLOC_FLAG_CPU_MAPPED to
pvr_cmd_buffer_alloc_mem(). This is redundant for sub-allocations,
as they are always unconditionally mapped to the CPU.
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23463>
SoroushIMG [Tue, 16 May 2023 13:22:15 +0000 (14:22 +0100)]
pvr: fix infinite recursion in pvr_cmd_buffer_{start,end}_sub_cmd
Reported-by: James Glanville <james.glanville@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23463>
Gert Wollny [Mon, 27 Feb 2023 08:56:41 +0000 (09:56 +0100)]
util/driconf: pin minImageCount to three for "Path of Exile"
"Path of Exile" will fail with an error "unsupported backbuffer image count"
when vkGetPhysicalDeviceSurfaceCapabilitiesKHR reports more than 3 as
minImageCount.
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21547>
Caio Oliveira [Wed, 7 Jun 2023 20:13:53 +0000 (13:13 -0700)]
r600/sfn: Fix warning about overloads hiding virtual functions
Fixes multiple warnings when building with g++ 13.1.1 that look like
```
./src/gallium/drivers/r600/sfn/sfn_scheduler.cpp:1111:9: warning: ‘virtual void r600::CheckArrayAccessVisitor::visit(const r600::InlineConstant&)’ was hidden [-Woverloaded-virtual=]
1111 | void visit(const InlineConstant& value) override {(void)value;}
| ^~~~~
../src/gallium/drivers/r600/sfn/sfn_scheduler.cpp:1125:9: note: by ‘virtual void r600::UpdateArrayWrite::visit(const r600::LocalArrayValue&)’
1125 | void visit(const LocalArrayValue& value) override {
| ^~~~~
(...)
```
What's going on here is when mixing overloading and virtual functions,
compiler will warn when one of the variants is not overriden. So tell
it to also use the base class definitions.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23509>
Yonggang Luo [Sun, 4 Jun 2023 06:59:45 +0000 (14:59 +0800)]
compiler: use align instead glsl_align and remove glsl_align
#include "util/u_math.h" when necessary to call align function
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23421>
Yonggang Luo [Sun, 4 Jun 2023 06:59:01 +0000 (14:59 +0800)]
util: Do not use align as variable name
Because align is also a function in u_math.h
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23421>
Yonggang Luo [Sun, 4 Jun 2023 06:42:51 +0000 (14:42 +0800)]
util: use uint32_t as the parameter of align function
align on negative value doesn't make sense
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23421>
Yonggang Luo [Mon, 5 Jun 2023 17:00:03 +0000 (01:00 +0800)]
util: Remove redundant type cast in function align64
Fixes:
0a06cf75231 ("util: migrate alignment functions and macros to use ALIGN_POT")
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23421>
Konstantin Seurer [Fri, 5 May 2023 19:34:16 +0000 (21:34 +0200)]
gallivm: Zero initialize param structs
Zero all param structs using {0} because it's shorter than a memset and
there were some instances where the structs weren't zero initialized.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>
Konstantin Seurer [Sun, 28 May 2023 09:36:13 +0000 (11:36 +0200)]
gallivm: Handle invalid image format/op combinations
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>
Konstantin Seurer [Fri, 28 Apr 2023 09:27:52 +0000 (11:27 +0200)]
gallivm: Add lp_img_op_from_intrinsic
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>
Konstantin Seurer [Tue, 25 Apr 2023 15:32:51 +0000 (17:32 +0200)]
gallivm: Add lp_build_nir_sample_key
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>
Konstantin Seurer [Fri, 21 Apr 2023 09:43:53 +0000 (11:43 +0200)]
llvmpipe: Add lp_storage_render_image_format_supported
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>
Konstantin Seurer [Wed, 19 Apr 2023 21:00:40 +0000 (23:00 +0200)]
llvmpipe: Add lp_storage_image_format_supported
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>
Konstantin Seurer [Thu, 8 Jun 2023 03:16:49 +0000 (13:16 +1000)]
llvmpipe: refactor out the pipe->lp_jit structure fillers.
These are useful later for descriptor indexing, but refactor them
out now.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>
Konstantin Seurer [Wed, 7 Jun 2023 20:23:52 +0000 (22:23 +0200)]
gallivm: Cast read_first_invocation source to an int
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>
Konstantin Seurer [Mon, 1 May 2023 17:35:55 +0000 (19:35 +0200)]
gallivm: Fix anisotropic sampling with num_mips=1
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23515>
Dave Airlie [Wed, 7 Jun 2023 02:05:44 +0000 (12:05 +1000)]
lavapipe: ignore another yuv format.
Since these were added to generic translation, lavapipe has
been annoyed.
Cc: mesa-stable
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23486>
Dave Airlie [Tue, 6 Jun 2023 07:30:02 +0000 (17:30 +1000)]
radv/video: fix hevc scaling lists.
These need some zscan conversion, that I've taken from vaapi.
v2: move to common code for it_ptr updates, add defines
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>
Dave Airlie [Wed, 31 May 2023 02:54:53 +0000 (12:54 +1000)]
radv/video: fix hevc st rps programming
These needs to be programmed to fix some video glitches.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>
Dave Airlie [Wed, 31 May 2023 01:47:27 +0000 (11:47 +1000)]
radv/video: rework h265 reference frame bindings.
This reworks the ref frame bindings and allows dropping the tier_2 workaround.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>
Dave Airlie [Tue, 30 May 2023 05:06:11 +0000 (15:06 +1000)]
radv/video: don't supply an 8-bit format for a 10-bit dpb.
The firmware can write an 8-bit output buffer, but still needs
a 10-bit dpb allocation.
This also puts the 8-bit format after the 10-bit format though
apps should be smart enough to pick the correct one.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>
Dave Airlie [Tue, 30 May 2023 04:45:48 +0000 (14:45 +1000)]
radv/video: convert session memory requirements to outarray.
These are just standard outarray so use the common code.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>
Dave Airlie [Tue, 30 May 2023 04:43:23 +0000 (14:43 +1000)]
radv/video: convert video format properties to an outarray
These are just standard outarray so use the common code.
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23476>
Chia-I Wu [Wed, 7 Jun 2023 01:14:54 +0000 (18:14 -0700)]
radv: fix non-square compressed image copy on gfx9
There is a typo in fixup_gfx9_cs_copy.
Fixed dEQP-VK.api.copy_and_blit.*.image_to_buffer.2d_images.mip_copies_bc*_64x192_* in deqp 1.3.6.0.
Fixes:
35f053ba8cd ("radv: Fix corrupted mipmap copies on GFX9+")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23483>
Karol Herbst [Sat, 20 May 2023 20:29:10 +0000 (22:29 +0200)]
rusticl/event: flush queues from dependencies
We have to flush all event dependencies inside clWaitForEvents and
clFinish implicitly otherwise applications might wait forever.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9052
Fixes:
ebfffa1daec ("rusticl/event: wrong but non crashing impl of clWaitForEvents")
Cc: mesa-stable
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23110>
Karol Herbst [Wed, 24 May 2023 15:31:12 +0000 (17:31 +0200)]
rusticl: bump rust req to 1.60
We need this rustc bugfix:
https://github.com/rust-lang/rust/commit/
6466f89fc5df36b4c841fca9d10e27c50dd744b5
Cc: mesa-stable
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23110>
Karol Herbst [Wed, 24 May 2023 15:02:48 +0000 (17:02 +0200)]
doc/rusticl: add Rust Update Policy
Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23110>
Matt Turner [Wed, 7 Jun 2023 00:53:41 +0000 (20:53 -0400)]
u_format: Use memcpy to avoid unaligned accesses
These functions are used by gl[Get]TexImage, which imposes no
alignment restructions on the void *pixels parameter.
This fixes an unaligned access in GTK's "gtk:gdk / memorytexture" unit
test on SPARC, which causes the test to fail.
Fixes:
45ae4434b5b ("util: Use bitshift arithmetic to unpack pixels.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23482>
Pierre-Eric Pelloux-Prayer [Wed, 7 Jun 2023 08:28:23 +0000 (10:28 +0200)]
Revert "gallium/u_threaded: buffer sharedness tracking"
This reverts commit
8f159a8576efbb7bb3755d215a54b87c4c99a0d2.
This commit is correct but it exposes an existing bug: DISCARD_RANGE doesn't
work well with shared buffers.
So for now revert this commit as it's causing hangs on some APUs (see
https://gitlab.freedesktop.org/drm/amd/-/issues/2447) and flickering in
Metro Last Light Redux.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9108
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23492>
Lionel Landwerlin [Fri, 2 Jun 2023 07:02:29 +0000 (10:02 +0300)]
anv: allow binding tables allocations on compute only queues
COMPUTE_WALKER is using binding tables.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
eb2b309328 ("anv: defer binding table block allocation to when necessary")
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23506>
Dave Airlie [Wed, 7 Jun 2023 05:39:11 +0000 (15:39 +1000)]
draw: repack some members of context.
this just fills a hole in
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23487>
Dave Airlie [Wed, 7 Jun 2023 05:33:34 +0000 (15:33 +1000)]
draw: add a max stage define and use it in a few places
This should decrease the size of some memory allocations.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23487>
Dave Airlie [Wed, 7 Jun 2023 05:16:47 +0000 (15:16 +1000)]
draw: refactor resources to use arrays instead of explicit structs.
This should simplify the code and make it easier to refactor later.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23487>
Dave Airlie [Wed, 7 Jun 2023 05:00:56 +0000 (15:00 +1000)]
gallium/tgsi/draw/softpipe: remodel shader const/buffer bindings.
This remodels things around a buffer object.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23487>
Dave Airlie [Wed, 7 Jun 2023 05:00:25 +0000 (15:00 +1000)]
draw/tess: drop unused tgsi bits.
tess isn't supported by tgsi
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23487>
Dave Airlie [Wed, 7 Jun 2023 04:33:34 +0000 (14:33 +1000)]
draw: rename jit to vs_jit in lots of places.
we should have done this when geom shaders got added,
do it now, will make it easier to consolidate some code in macros
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23487>
Dave Airlie [Wed, 7 Jun 2023 01:25:49 +0000 (11:25 +1000)]
gallivm/nir: fix shuffleup tests.
So the shuffleup tests did a shuffle up with const 5,
we'd use invocation id (0..8) shuffle it down by 5,
get (-5..3), then call llvmshufflevector with that
which is totally illegal.
There might be a nicer way to fix this, but I can't see
it straight away, just bail on the fast path.
Fixes:
dEQP-VK.subgroups.shuffle.compute.subgroupshuffleup*
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23484>
Mike Blumenkrantz [Fri, 2 Jun 2023 14:22:11 +0000 (10:22 -0400)]
lavapipe: NV_device_generated_commands
this adds sufficient handling to pass the vkd3d-proton tests as well
as running cts on zink, which is gonna have to be enough since there's
no vkcts
it works by dynamically generating a vk_cmd_queue list of commands just
like the regular cmd queue would generate, with the minor change that
the final link has a nulled next pointer to correctly handle buffer copies,
where the last link would otherwise have a next pointer pointing to the
original cmd list
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23394>
Mike Blumenkrantz [Fri, 2 Jun 2023 14:19:36 +0000 (10:19 -0400)]
lavapipe: handle index buffers with offsets for indirect draws
gallium has no mechanism for setting an offset to the index buffer,
so this requires a new buffer to be created+bound dynamically at
the specified offset in order to read the correct data
cc: mesa-stable
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23394>
Mike Blumenkrantz [Wed, 31 May 2023 16:01:24 +0000 (12:01 -0400)]
lavapipe: add a zeroed buffer that can be bound in place of an index buffer
technically this is illegal in vulkan semantics, but some extensions have
their own definition of "illegal" when it comes to binding index buffers
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23394>
Mike Blumenkrantz [Wed, 31 May 2023 15:59:25 +0000 (11:59 -0400)]
lavapipe: add a mapping for BDA
when passing around BDA, it's important to be able to link the pointer
back to the pipe_resource since BDA doesn't have an explicit lifetime
this mapping enables cmds to receive a BDA pointer and then map it back
to a pipe_resource in order to avoid gymnastics with dynamically creating
pipe_resource objects which may or may not be able to be freed
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23394>
Mike Blumenkrantz [Thu, 25 May 2023 14:11:33 +0000 (10:11 -0400)]
lavapipe: pass list to cmdbuf exec, not cmdbuf
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23394>
Daniel Schürmann [Wed, 10 May 2023 07:48:46 +0000 (09:48 +0200)]
radv/rt: remove now dead code
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Wed, 22 Mar 2023 01:12:35 +0000 (02:12 +0100)]
radv/rt: use priorities to select the next shader
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Wed, 22 Mar 2023 20:21:31 +0000 (21:21 +0100)]
radv/debug: dump ray tracing shaders in case of a hang
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Fri, 10 Mar 2023 17:40:58 +0000 (18:40 +0100)]
radv/rt: separate shader compilation
With this patch, we compile separately
- general shaders (raygen, miss, callable)
- closest-hit shaders
- traversal shader (incl. all intersection / any-hit shaders)
Each shader uses the following scheme:
if (shader_pc == shader_va) {
<shader code>
}
next = select_next_shader(shader_va)
jump next
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Thu, 9 Mar 2023 16:44:46 +0000 (17:44 +0100)]
aco: adjust RT prolog for shader functions [disables RT]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Thu, 9 Mar 2023 15:13:41 +0000 (16:13 +0100)]
radv/rt: adjust lower_rt_instructions() for shader functions [disables RT]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Wed, 8 Mar 2023 11:27:27 +0000 (12:27 +0100)]
radv/rt: set up RT shader args for separate compilation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Friedrich Vock [Sun, 30 Apr 2023 18:01:35 +0000 (20:01 +0200)]
radv: Disable capture/replay handles
They don't work with separate compilation. Fixing this involves some
refactoring work, which will come in future MRs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Tue, 9 May 2023 09:15:19 +0000 (11:15 +0200)]
radv/rt: create compile_rt_prolog() function
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Tue, 9 May 2023 00:13:30 +0000 (02:13 +0200)]
radv/rt: don't write cache hit feedback per stage.
Too much boilerplate for no benefit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Mon, 8 May 2023 17:41:12 +0000 (19:41 +0200)]
radv/rt: reference library shaders during radv_rt_fill_stage_info()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Mon, 20 Mar 2023 23:42:11 +0000 (00:42 +0100)]
radv/rt: add and use specialized cache search/insert functions
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Thu, 1 Jun 2023 10:20:31 +0000 (12:20 +0200)]
radv/rt: pass radv_ray_tracing_pipeline to RT shader creation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Thu, 1 Jun 2023 09:59:29 +0000 (11:59 +0200)]
radv/rt: replace pCreateInfo with VkPipelineCreateFlags in rt_variables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Tue, 9 May 2023 10:06:46 +0000 (12:06 +0200)]
radv/rt: change RT main shader to MESA_SHADER_INTERSECTION
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Wed, 8 Mar 2023 03:27:30 +0000 (04:27 +0100)]
radv/rt: implement radv_rt_nir_to_asm()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Mon, 6 Mar 2023 19:03:49 +0000 (20:03 +0100)]
radv/rt: implement radv_nir_lower_rt_abi to lower RT shaders for separate compilation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Tue, 11 Apr 2023 19:58:15 +0000 (21:58 +0200)]
radv/shader_info: add RT stages to radv_get_user_data_0()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Tue, 7 Mar 2023 23:36:45 +0000 (00:36 +0100)]
radv/rt: extend radv_pipeline_group_handle with shader VAs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Fri, 10 Mar 2023 19:10:25 +0000 (20:10 +0100)]
radv/rt: adjust shared_size when lowering hit_attribs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Fri, 10 Mar 2023 18:56:43 +0000 (19:56 +0100)]
aco: implement select_program_rt()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Thu, 12 May 2022 21:29:37 +0000 (23:29 +0200)]
aco: implement nir_intrinsic_load_resume_shader_address_amd
Similar to p_constaddr but targeting BBs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Thu, 12 May 2022 21:21:57 +0000 (23:21 +0200)]
nir: add nir_intrinsic_resume_shader_address_amd
This intrinsic returns a pointer to the end of the shader
and is intended for stitched binaries.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Fri, 13 May 2022 10:49:40 +0000 (12:49 +0200)]
nir,amd: add nir_intrinsic_store_[scalar|vector]_arg_amd to overwrite inputs
This intrinsic must only be used at top-level CF in order
to not break SSA properties.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Daniel Schürmann [Wed, 8 Mar 2023 15:02:42 +0000 (16:02 +0100)]
radv: add remaining RT shader args for separate compilation
Also wrap RT args into struct {} rt for improved consistency
and remove some 'ray_' prefixes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22096>
Kenneth Graunke [Mon, 5 Jun 2023 21:14:09 +0000 (14:14 -0700)]
intel/genxml: Drop Tiled Resource Mode fields
Neither RENDER_SURFACE_STATE nor VDENC_SURFACE_CONTROL_BITS have a
Tiled Resource Mode field anymore. The RENDER_SURFACE_STATE field
was also overlapping with the L1 Cache Control settings field.
This also drops the assignment of that field in isl, because we were
just explicitly setting it to NONE (0) which is already the default
value genxml packing will give us. That saves us some ifdefs.
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23449>
Nanley Chery [Thu, 18 May 2023 18:10:03 +0000 (11:10 -0700)]
iris: Assert against FCV_CCS_E for blitter writes
The FCV feature is documented to occur on regular render writes. Blitter
writes don't fall under that category. So, if the destination resource
of a blitter write had the FCV aux usage, we would have a good reason to
change the aux usage of the access to plain CCS_E.
We don't actually need to write code to handle this. iris doesn't use
any compression on blitter writes. Make that obvious with an assert.
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23220>
Nanley Chery [Thu, 18 May 2023 18:05:44 +0000 (11:05 -0700)]
iris: Avoid FCV_CCS_E for shader image accesses
The FCV feature is documented to occur on regular render writes. Images
are written to with the DC data port however.
By using plain CCS_E for image writes, we can avoid the COMPRESSED_CLEAR
aux state in more cases. Doing this can avoid full resolves or partial
resolves for future accesses.
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23220>
Nanley Chery [Wed, 24 May 2023 17:05:45 +0000 (10:05 -0700)]
iris: Avoid extra CCS_E flushes for aux mode changes
We're going to start toggling between FCV_CCS_E and CCS_E. When
switching aux modes, flush_previous_aux_mode would typically perform
cache flushes for good reason. In the case of switching between CCS_E
with FCV on vs off, we haven't found aux mode flushing to matter. Treat
both CCS_E variants as equivalent to avoid extra cache flushing.
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23220>
Nanley Chery [Wed, 12 Apr 2023 18:01:11 +0000 (11:01 -0700)]
intel: Rename the GFX12_CCS_E aux-usage to FCV_CCS_E
Rename the isl_aux_usage enum to clarify that it is optional on gfx125.
The new name comes from the Alchemist docs, where the feature is
referred to as "Fast Clear Optimization (FCV)".
The rename was done with this command:
git grep -l "GFX12_CCS_E" | xargs sed -ie "s/GFX12_CCS_E/FCV_CCS_E/g"
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23220>
Nanley Chery [Thu, 18 May 2023 20:11:07 +0000 (13:11 -0700)]
iris: Drop a GFX12_CCS_E check in can_fast_clear_color
The 8 bpp restriction isn't specific to the automatic fast clear
behavior of GFX12_CCS_E. It is applicable to both GFX12_CCS_E and CCS_E.
Drop the aux usage check completely.
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23220>
Caio Oliveira [Sat, 27 May 2023 04:54:53 +0000 (21:54 -0700)]
compiler/types: Make key in subroutine_name more effective
Use the string itself as a key for searching -- and the internal
allocated name as a key when storing.
Because record_key_hash doesn't consider the name field, which is
the only used field for a SUBROUTINE type, the hash key was always
the same for all types. Using the name fixes this.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23277>
Mark Janes [Mon, 5 Jun 2023 17:13:19 +0000 (10:13 -0700)]
anv: convert Wa_14010455700 to use workaround mechanism
The original lineage for
14010455700 is
1808121037. Use this defect
number to apply the workaround to relevant platforms with the new
workaround mechanism.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23380>
Mark Janes [Thu, 1 Jun 2023 16:18:28 +0000 (09:18 -0700)]
iris: convert Wa_14010455700 to use workaround mechanism
The original lineage for
14010455700 is
1808121037. Use this defect
number to apply the workaround to relevant platforms with the new
workaround mechanism.
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23380>
Simon Ser [Fri, 19 May 2023 23:12:41 +0000 (01:12 +0200)]
Update OpenGL headers
Token from commit
91cdaf381d77b6e700654ecd78cb88a95c1fde1a of
OpenGL-Registry.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23144>
Marek Olšák [Tue, 6 Jun 2023 15:40:13 +0000 (11:40 -0400)]
amd: drop support for LLVM 14
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23471>
Marek Olšák [Tue, 6 Jun 2023 15:09:11 +0000 (11:09 -0400)]
amd: drop support for LLVM 13
We can remove the LLVM 13 Wave32 discard workaround and
SI_PROFILE_IGNORE_LLVM13_DISCARD_BUG that disabled the workaround.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23471>
Marek Olšák [Tue, 6 Jun 2023 14:59:46 +0000 (10:59 -0400)]
amd: drop support for LLVM 12
The demote emulation can be removed, and FS_CORRECT_DERIVS_AFTER_KILL
can be removed because it's always enabled on LLVM >= 13.
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23471>
Marek Olšák [Tue, 6 Jun 2023 14:47:03 +0000 (10:47 -0400)]
amd: drop support for LLVM 11
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23471>
Yogesh Mohan Marimuthu [Tue, 6 Jun 2023 06:04:05 +0000 (11:34 +0530)]
ac/gpu_info: rearrange if checks for dcc config
rearrange the if checks so that there is less if checks
for newer gpus.
v2: fix block comment coding guideline (Marek Olšák)
simplify gfx9 if condition (Marek Olšák)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23454>
Yogesh Mohan Marimuthu [Tue, 6 Jun 2023 05:26:16 +0000 (10:56 +0530)]
ac/gpu_info: num_cu = 4 and gfx11 enable dcc with retile
With num_cu = 4 in gfx11 measured power for idle, video playback and observed
power savings, hence enable dcc with retile for gfx11 with num_cu >= 4.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23454>
Christian Gmeiner [Mon, 5 Jun 2023 13:32:13 +0000 (15:32 +0200)]
etnaviv: nir: do not call nir_lower_idiv(..) unconditionally
GPUs without native integers lower idiv in lower_int_to_float and
there is no need to call nir_lower_idiv(..) for such GPUs.
Fixes nir crashes I am seeing with gc2000_gles2 CI job.
Fixes:
f532202f2d5 ("etnaviv: use nir_lower_idiv(..) before opt loop")
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23450>
Iago Toral Quiroga [Tue, 6 Jun 2023 08:39:37 +0000 (10:39 +0200)]
v3d,v3dv: fix viewport offset for negative viewport center
If the viewport center is not positive we can't express it
through the fine coordinates, which are unsigned, and we
need to use the coarse coordinates too.
Fixes new crashes in Vulkan CTS 1.3.6.0:
dEQP-VK.draw.renderpass.offscreen_viewport.*negative*
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23489>
Iago Toral Quiroga [Tue, 6 Jun 2023 08:38:26 +0000 (10:38 +0200)]
broadcom/cle: fix up viewport offset packet definition for V3D 4.1+
These are split between fine and coarse coordinates. We have only been
using fine until now, so we kept the same naming convention we had
prior to V3D 4.1 for simplicity, but we will start using the coarse
coordinates soon too.
Also, the signedness was reversed: coarse coordinates are signed and
fine coordinates are unsigned.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23489>
Iago Toral Quiroga [Mon, 5 Jun 2023 09:39:19 +0000 (11:39 +0200)]
v3dv: simplify scissor setup for negative viewport height
KHR_maintenance1 allows clients to specify a negative
height, but not a negative width, so assert on that and
simplify the computations for the horizontal dimension.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23489>
Iago Toral Quiroga [Mon, 5 Jun 2023 08:52:57 +0000 (10:52 +0200)]
v3dv: remove bogus viewport code
This is incorrectly undoing the code right above it.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23489>
Mike Blumenkrantz [Wed, 7 Jun 2023 13:03:40 +0000 (09:03 -0400)]
zink: add a ci flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23092>
Mike Blumenkrantz [Thu, 4 May 2023 13:49:23 +0000 (09:49 -0400)]
zink: enable EXT_shader_object globally with have_EXT_attachment_feedback_loop_dynamic_state
this leaves fbfetch as the lone case where it can't yet be used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23092>