platform/upstream/mesa.git
16 months agoiris/screen: add PIPE_CAP_TIMER_RESOLUTION
norablackcat [Sat, 17 Jun 2023 20:52:09 +0000 (14:52 -0600)]
iris/screen: add PIPE_CAP_TIMER_RESOLUTION

Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>

16 months agocrocus/screen: add PIPE_CAP_TIMER_RESOLUTION
norablackcat [Sat, 17 Jun 2023 20:50:16 +0000 (14:50 -0600)]
crocus/screen: add PIPE_CAP_TIMER_RESOLUTION

Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>

16 months agosofpipe/screen: add PIPE_CAP_TIMER_RESOLUTION
norablackcat [Sat, 17 Jun 2023 20:49:59 +0000 (14:49 -0600)]
sofpipe/screen: add PIPE_CAP_TIMER_RESOLUTION

Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>

16 months agollvmpipe/screen: add PIPE_CAP_TIMER_RESOLUTION
norablackcat [Sat, 17 Jun 2023 20:49:46 +0000 (14:49 -0600)]
llvmpipe/screen: add PIPE_CAP_TIMER_RESOLUTION

Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>

16 months agogallium: add PIPE_CAP_TIMER_RESOLUTION
norablackcat [Sat, 17 Jun 2023 20:49:12 +0000 (14:49 -0600)]
gallium: add PIPE_CAP_TIMER_RESOLUTION

Reviewed by Marek Olšák

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23703>

16 months agoradeonsi: clean up #includes
Marek Olšák [Fri, 16 Jun 2023 06:16:00 +0000 (02:16 -0400)]
radeonsi: clean up #includes

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: declare compiler[] and nir_options as pointers to reduce #includes
Marek Olšák [Fri, 16 Jun 2023 06:14:05 +0000 (02:14 -0400)]
radeonsi: declare compiler[] and nir_options as pointers to reduce #includes

so that we don't have to include the structure definitions.
(ac_llvm_compiler includes LLVM, and nir_options includes NIR)

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: clean up query functions, make them static, remove forward decls
Marek Olšák [Thu, 15 Jun 2023 01:37:59 +0000 (21:37 -0400)]
radeonsi: clean up query functions, make them static, remove forward decls

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi/gfx11: use SET_SH_REG_PAIRS_PACKED for compute by buffering reg writes
Marek Olšák [Sun, 11 Jun 2023 22:37:26 +0000 (18:37 -0400)]
radeonsi/gfx11: use SET_SH_REG_PAIRS_PACKED for compute by buffering reg writes

This is the compute portion of the work. It uses a separate buffer
for compute SH registers in si_context.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi/gfx11: use SET_SH_REG_PAIRS_PACKED for gfx by buffering reg writes
Marek Olšák [Sun, 11 Jun 2023 22:37:26 +0000 (18:37 -0400)]
radeonsi/gfx11: use SET_SH_REG_PAIRS_PACKED for gfx by buffering reg writes

Instead of writing SH registers into the command buffer, push them into
an array in si_context. Before a draw, take all buffered register writes
and create a single SET_SH_REG_PAIRS_PACKED packet for them.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: reorder compute code to prepare for packed SET_SH_REG packets
Marek Olšák [Sun, 11 Jun 2023 21:42:21 +0000 (17:42 -0400)]
radeonsi: reorder compute code to prepare for packed SET_SH_REG packets

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi/gfx11: enable register shadowing by default
Marek Olšák [Sun, 11 Jun 2023 02:21:13 +0000 (22:21 -0400)]
radeonsi/gfx11: enable register shadowing by default

required by SET_SH_REG_PAIRS_PACKED*

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi/gfx11: fix GLCTS with register shadowing by keeping the CS preamble
Marek Olšák [Sun, 11 Jun 2023 02:07:40 +0000 (22:07 -0400)]
radeonsi/gfx11: fix GLCTS with register shadowing by keeping the CS preamble

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: remove uses_reg_shadowing parameter from si_init_gfx_preamble_state
Marek Olšák [Sun, 11 Jun 2023 01:54:50 +0000 (21:54 -0400)]
radeonsi: remove uses_reg_shadowing parameter from si_init_gfx_preamble_state

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: remove radeon_winsys::cs_set_preamble
Marek Olšák [Sun, 11 Jun 2023 01:49:19 +0000 (21:49 -0400)]
radeonsi: remove radeon_winsys::cs_set_preamble

It only does radeon_emit_array and it's not possible to do anything better.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: use si_pm4_create_sized for the shadowing preamble
Marek Olšák [Sun, 11 Jun 2023 01:44:35 +0000 (21:44 -0400)]
radeonsi: use si_pm4_create_sized for the shadowing preamble

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: don't do BREAK_BATCH for context regs with only 1 context per batch
Marek Olšák [Sun, 11 Jun 2023 01:41:49 +0000 (21:41 -0400)]
radeonsi: don't do BREAK_BATCH for context regs with only 1 context per batch

because it has no effect

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: keep pipeline statistics disabled when they are not used
Marek Olšák [Sat, 13 May 2023 03:10:21 +0000 (23:10 -0400)]
radeonsi: keep pipeline statistics disabled when they are not used

so that we don't always disable/enable pipeline stats around blits
when there are no pipeline stat queries

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: determine si_pm4_state::reg_va_low_idx automatically
Marek Olšák [Wed, 7 Jun 2023 17:43:31 +0000 (13:43 -0400)]
radeonsi: determine si_pm4_state::reg_va_low_idx automatically

The existing code doesn't work with the packed SET packets, so si_pm4_state
needs to find reg_va_low_idx after the whole packet is built.

Remove si_pm4_set_reg_va and do the same thing for SET_SH_REG.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi/gfx11: use SET_*_REG_PAIRS_PACKED packets for pm4 states
Marek Olšák [Sat, 3 Jun 2023 11:19:01 +0000 (07:19 -0400)]
radeonsi/gfx11: use SET_*_REG_PAIRS_PACKED packets for pm4 states

It can generate all PACKED packets, but only SET_CONTEXT_REG_PAIRS_PACKED
is generated because register shadowing is required by
SET_SH_REG_PAIRS_PACKED*.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: eliminate redundant TCS user data and RSRC2 register changes
Marek Olšák [Thu, 8 Jun 2023 04:58:37 +0000 (00:58 -0400)]
radeonsi: eliminate redundant TCS user data and RSRC2 register changes

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: move the only tcs_out_lds_offsets field to vs_state_bits
Marek Olšák [Thu, 8 Jun 2023 04:12:39 +0000 (00:12 -0400)]
radeonsi: move the only tcs_out_lds_offsets field to vs_state_bits

This removes 1 user data SGPR.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: replace tcs_out_lds_layout with nearly identical tes_offchip_addr
Marek Olšák [Thu, 8 Jun 2023 03:48:13 +0000 (23:48 -0400)]
radeonsi: replace tcs_out_lds_layout with nearly identical tes_offchip_addr

tcs_out_lds_layout is basically renamed to tes_offchip_addr in TCS, using
the same variable as TES and also using the same bit layout. The only
difference in the bit layout was that TCS had to mask out the low bits,
which this also removes.

The enums are renamed to *_SGPR_TCS_OFFCHIP_ADDR so as not to conflict
with *_SGPR_TES_OFFCHIP_ADDR, which are in different user data SGPRs.

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agoradeonsi: move TCS.gl_PatchVerticesIn into the tcs_offchip_layout SGPR
Marek Olšák [Thu, 8 Jun 2023 03:39:57 +0000 (23:39 -0400)]
radeonsi: move TCS.gl_PatchVerticesIn into the tcs_offchip_layout SGPR

we'll be able to remove 1 TCS user data SGPR thanks to this

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23517>

16 months agozink/ci: remove 3 tests from the fails list
Martin Roukala (né Peres) [Thu, 22 Jun 2023 07:10:46 +0000 (10:10 +0300)]
zink/ci: remove 3 tests from the fails list

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23789>

16 months agoamd/ci: temporarily disable some manual jobs that take a long time to run
Martin Roukala (né Peres) [Thu, 22 Jun 2023 06:14:31 +0000 (09:14 +0300)]
amd/ci: temporarily disable some manual jobs that take a long time to run

We are trying to re-enable the valve CI... but doing so runs all the
jobs, including the manual ones.

Since some can take over an hour to run, let's disable them, and
re-enable them in another MR by reverting this commit.

Sorry for the noise!

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23789>

16 months agoRevert "ci: mark the valve farm as down"
Martin Roukala (né Peres) [Thu, 22 Jun 2023 04:39:48 +0000 (07:39 +0300)]
Revert "ci: mark the valve farm as down"

Fixed by rebooting the gateway. A post-mortem analysis will be
performed to figure out what happened!

This reverts commit 2089fc8188635ed0ee72e2ddc009e7a775210bb7.

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23789>

16 months agonir_opt_algebraic: don't use i32csel without native integer support
Pavel Ondračka [Sat, 17 Jun 2023 11:50:05 +0000 (13:50 +0200)]
nir_opt_algebraic: don't use i32csel without native integer support

Otherwise nir_lower_int_to_float (or specifically nir_gather_ssa_types)
will fail to recognize we already have float constants and converts them
again.

Example from spec/glsl-1.10/execution/vs-loop-array-index-unroll.shader_test
with r300 driver (after enabling has_fused_comp_and_csel).

impl main {
        block block_0:
        /* preds: */
        vec1 32 ssa_0 = load_const (0x00000000 = 0.000000)
        vec4 32 ssa_1 = intrinsic load_input (ssa_0) (base=0, component=0, dest_type=float32, io location=VERT_ATTRIB_POS slots=1)      /* gl_Vertex */
        vec3 32 ssa_2 = load_const (0x00000000, 0x3e800000, 0x3f800000) = (0.000000, 0.250000, 1.000000)
        vec3 32 ssa_3 = load_const (0x00000000, 0x3f000000, 0x3f800000) = (0.000000, 0.500000, 1.000000)
        vec3 32 ssa_4 = load_const (0x00000000, 0x3f400000, 0x3f800000) = (0.000000, 0.750000, 1.000000)
        vec2 32 ssa_5 = load_const (0x00000000, 0x3f800000) = (0.000000, 1.000000)
        vec1 32 ssa_6 = load_const (0x3f800000 = 1.000000)
        vec1 32 ssa_7 = intrinsic load_ubo_vec4 (ssa_0, ssa_0) (access=0, base=0, component=0)
        vec4 32 ssa_8 = load_const (0x00000000, 0x00000001, 0x00000002, 0x00000003) = (0.000000, 0.000000, 0.000000, 0.000000)
        vec4  1 ssa_9 = ilt ssa_8, ssa_7.xxxx
        vec3 32 ssa_10 = bcsel ssa_9.www, ssa_5.xyy, ssa_4
        vec3 32 ssa_11 = bcsel ssa_9.zzz, ssa_10, ssa_3
        vec3 32 ssa_12 = bcsel ssa_9.yyy, ssa_11, ssa_2
        vec3 32 ssa_15 = i32csel_gt ssa_7.xxx, ssa_12, ssa_6.xxx
        vec4 32 ssa_14 = fsat ssa_15.xyxz
        intrinsic store_output (ssa_14, ssa_0) (base=1, wrmask=xyzw, component=0, src_type=float32, io location=VARYING_SLOT_COL0 slots=1, xfb(), xfb2())       /* gl_FrontColor */
        intrinsic store_output (ssa_1, ssa_0) (base=0, wrmask=xyzw, component=0, src_type=float32, io location=VARYING_SLOT_POS slots=1, xfb(), xfb2()) /* gl_Position */
        /* succs: block_1 */
        block block_1:
}

and after nir_lower_int_to_float

impl main {
        block block_0:
        /* preds: */
        vec1 32 ssa_0 = load_const (0x00000000 = 0.000000)
        vec4 32 ssa_1 = intrinsic load_input (ssa_0) (base=0, component=0, dest_type=float32, io location=VERT_ATTRIB_POS slots=1)      /* gl_Vertex */
        vec3 32 ssa_2 = load_const (0x00000000, 0x4e7a0000, 0x4e7e0000) = (0.000000, 1048576000.000000, 1065353216.000000)
        vec3 32 ssa_3 = load_const (0x00000000, 0x4e7c0000, 0x4e7e0000) = (0.000000, 1056964608.000000, 1065353216.000000)
        vec3 32 ssa_4 = load_const (0x00000000, 0x4e7d0000, 0x4e7e0000) = (0.000000, 1061158912.000000, 1065353216.000000)
        vec2 32 ssa_5 = load_const (0x00000000, 0x4e7e0000) = (0.000000, 1065353216.000000)
        vec1 32 ssa_6 = load_const (0x4e7e0000 = 1065353216.000000)
        vec1 32 ssa_7 = intrinsic load_ubo_vec4 (ssa_0, ssa_0) (access=0, base=0, component=0)
        vec4 32 ssa_8 = load_const (0x00000000, 0x3f800000, 0x40000000, 0x40400000) = (0.000000, 1.000000, 2.000000, 3.000000)
        vec4  1 ssa_9 = flt ssa_8, ssa_7.xxxx
        vec3 32 ssa_10 = bcsel ssa_9.www, ssa_5.xyy, ssa_4
        vec3 32 ssa_11 = bcsel ssa_9.zzz, ssa_10, ssa_3
        vec3 32 ssa_12 = bcsel ssa_9.yyy, ssa_11, ssa_2
        vec3 32 ssa_13 = fcsel_gt ssa_7.xxx, ssa_12, ssa_6.xxx
        vec4 32 ssa_14 = fsat ssa_13.xyxz
        intrinsic store_output (ssa_14, ssa_0) (base=1, wrmask=xyzw, component=0, src_type=float32, io location=VARYING_SLOT_COL0 slots=1, xfb(), xfb2())       /* gl_FrontColor */
        intrinsic store_output (ssa_1, ssa_0) (base=0, wrmask=xyzw, component=0, src_type=float32, io location=VARYING_SLOT_POS slots=1, xfb(), xfb2()) /* gl_Position */
        /* succs: block_1 */
        block block_1:
}

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23704>

16 months agodocs/ci: fix command to disable/re-enable farms
Eric Engestrom [Wed, 21 Jun 2023 20:52:32 +0000 (21:52 +0100)]
docs/ci: fix command to disable/re-enable farms

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23780>

16 months agor600/sfn: Add source mod propagation also to fp64 ops
Gert Wollny [Tue, 20 Jun 2023 19:13:23 +0000 (21:13 +0200)]
r600/sfn: Add source mod propagation also to fp64 ops

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23754>

16 months agor600/sfn: Implement fsat for 64 bit ops
Gert Wollny [Tue, 20 Jun 2023 19:12:36 +0000 (21:12 +0200)]
r600/sfn: Implement fsat for 64 bit ops

Because a plain mov with the fsat modifier doesn't do a proper 64 bit fsat
we either have to propagate the op as modifier to the instruction that
creates the value, or we add a fake op that applies the fsat op, i.e. we
implement the mov as an add_64 with zero as the second value.

Fixes:  0ff3c4bef21e6768a53610337c39d1e306b3869e
    r600/sfn: drop use of nir source mods

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23754>

16 months agoanv: update conformanceVersion
Iván Briano [Wed, 21 Jun 2023 23:16:37 +0000 (16:16 -0700)]
anv: update conformanceVersion

The Vulkan CTS started generating the list of valid versions the driver
can report as conformant against based on the active branches, and the
1.3.0 branch we were reporting up to now is no longer valid.

Fixes dEQP-VK.api.driver_properties.conformance_version

Reviewed-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23784>

16 months agodzn: Align placed footprints used when copying linear <-> optimal for BC formats
Jesse Natalie [Wed, 14 Jun 2023 22:54:00 +0000 (15:54 -0700)]
dzn: Align placed footprints used when copying linear <-> optimal for BC formats

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23662>

16 months agoci: move .microsoft-farm-container-rules to test-source-dep.yml
Helen Koike [Mon, 19 Jun 2023 19:25:17 +0000 (16:25 -0300)]
ci: move .microsoft-farm-container-rules to test-source-dep.yml

farm rules are placed on test-source-dep.yml, so move it there.

This is also useful when trying to re-use the container/gitlab-ci.yml to
other workflows without running the jobs.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23731>

16 months agonir/lower_tex: ignore saturate for txf ops
Mike Blumenkrantz [Tue, 20 Jun 2023 17:48:05 +0000 (13:48 -0400)]
nir/lower_tex: ignore saturate for txf ops

saturate is used for GL_CLAMP emulation, and GL_CLAMP cannot be used
with txf

ref #9226

cc: mesa-stable

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23750>

16 months agozink: add fastpaths for no-op sampler/view rebinds
Mike Blumenkrantz [Tue, 13 Jun 2023 21:11:03 +0000 (17:11 -0400)]
zink: add fastpaths for no-op sampler/view rebinds

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>

16 months agozink: check sampler views pointer before loop
Mike Blumenkrantz [Tue, 13 Jun 2023 21:08:05 +0000 (17:08 -0400)]
zink: check sampler views pointer before loop

this doesn't need to be checked in every loop iteration

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>

16 months agozink: don't update tc info directly from cso binds
Mike Blumenkrantz [Fri, 9 Jun 2023 11:38:03 +0000 (07:38 -0400)]
zink: don't update tc info directly from cso binds

this somehow becomes expensive at extremely high fps, so defer
until rp begin to check layout change state

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>

16 months agozink: track and apply ds3 states only on change
Mike Blumenkrantz [Thu, 8 Jun 2023 20:24:27 +0000 (16:24 -0400)]
zink: track and apply ds3 states only on change

drivers don't do their own state tracking, so ensure the calls are only
made when necessary

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>

16 months agozink: use local screen var in blend state bind
Mike Blumenkrantz [Mon, 19 Jun 2023 16:19:19 +0000 (12:19 -0400)]
zink: use local screen var in blend state bind

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>

16 months agozink: clean up rp update tracking on dsa bind
Mike Blumenkrantz [Thu, 8 Jun 2023 17:54:26 +0000 (13:54 -0400)]
zink: clean up rp update tracking on dsa bind

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>

16 months agozink: specialize invalidate_descriptor_state hook for compact mode
Mike Blumenkrantz [Thu, 8 Jun 2023 17:03:48 +0000 (13:03 -0400)]
zink: specialize invalidate_descriptor_state hook for compact mode

the constant flag check here has perf implications at high fps,
so avoid it when possible

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>

16 months agozink: make invalidate_descriptor_state a ctx hook
Mike Blumenkrantz [Thu, 8 Jun 2023 17:03:32 +0000 (13:03 -0400)]
zink: make invalidate_descriptor_state a ctx hook

this will allow for specialization

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>

16 months agozink: force inlining for a bunch of functions
Mike Blumenkrantz [Mon, 12 Jun 2023 17:04:35 +0000 (13:04 -0400)]
zink: force inlining for a bunch of functions

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>

16 months agozink: no-op redundant samplemask changes
Mike Blumenkrantz [Wed, 14 Jun 2023 12:29:24 +0000 (08:29 -0400)]
zink: no-op redundant samplemask changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23758>

16 months agodzn: Fix multisample counts in device limits
Jesse Natalie [Wed, 14 Jun 2023 19:29:13 +0000 (12:29 -0700)]
dzn: Fix multisample counts in device limits

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23658>

16 months agodzn: Remove dynamic check for block-compressed support
Jesse Natalie [Wed, 14 Jun 2023 19:11:24 +0000 (12:11 -0700)]
dzn: Remove dynamic check for block-compressed support

None of this is optional in D3D

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23658>

16 months agodzn: Use common GetPhysicalDeviceFeatures2
Jesse Natalie [Wed, 14 Jun 2023 19:07:57 +0000 (12:07 -0700)]
dzn: Use common GetPhysicalDeviceFeatures2

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23658>

16 months agodzn: Inline D3D12 device creation in physical device creation
Jesse Natalie [Wed, 14 Jun 2023 18:57:18 +0000 (11:57 -0700)]
dzn: Inline D3D12 device creation in physical device creation

This was effectively happening *anyway* because WSI init was calling
functions that needed a D3D12 device around to be able to answer.
Just remove the whole song and dance of maybe not having a device.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23658>

16 months agoutil: reinstate ENUM_PACKED
Michel Zou [Tue, 6 Jun 2023 19:18:17 +0000 (21:18 +0200)]
util: reinstate ENUM_PACKED

gets rid of warning: 'gcc_struct' attribute ignored [-Wattributes] introduced by !23338

Fixes: 86532fa21de ("util: Use the gcc_struct attribute for packed structures in mingw")
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23478>

16 months agoegl/haiku: Fix potential crash if double buffering is disabled
Alexander von Gluck IV [Fri, 9 Jun 2023 16:48:44 +0000 (11:48 -0500)]
egl/haiku: Fix potential crash if double buffering is disabled

* Don't assume the existence of the back buffer in swap_buffers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23556>

16 months agoci: mark the valve farm as down
Eric Engestrom [Wed, 21 Jun 2023 20:34:25 +0000 (21:34 +0100)]
ci: mark the valve farm as down

docker daemon is down on mupuf-gfx10-vangogh-{1..3}

Signed-off-by: Eric Engestrom <eric@igalia.com>
16 months agointel/fs: Add missing newline
Ian Romanick [Wed, 21 Jun 2023 14:51:00 +0000 (07:51 -0700)]
intel/fs: Add missing newline

Emacs will add a newline to the end of this file whether I've edited
that line or not. It was driving me up the wall, so... yeah.

Trivial.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23777>

16 months agoradv: inline radv_can_enable_dual_src()
Mike Blumenkrantz [Thu, 8 Jun 2023 19:05:46 +0000 (15:05 -0400)]
radv: inline radv_can_enable_dual_src()

this is unexpectedly heavy

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23601>

16 months agoradv: remove redundant intermediate variable in radv_is_mrt0_dual_src()
Mike Blumenkrantz [Thu, 8 Jun 2023 19:02:40 +0000 (15:02 -0400)]
radv: remove redundant intermediate variable in radv_is_mrt0_dual_src()

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23601>

16 months agodzn: Ignore export access parameters
Jesse Natalie [Wed, 21 Jun 2023 15:39:02 +0000 (08:39 -0700)]
dzn: Ignore export access parameters

D3D requires these to just be GENERIC_ALL. Fixes some sharing tests.

Fixes: c64f1b66 ("dzn: Hook up win32 semaphore import/export")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23772>

16 months agoasahi: drop unnecessary DRM_FORMAT_MOD_{LINEAR,INVALID} fallbacks
Eric Engestrom [Wed, 21 Jun 2023 14:22:39 +0000 (15:22 +0100)]
asahi: drop unnecessary DRM_FORMAT_MOD_{LINEAR,INVALID} fallbacks

Since afe134a49c ("asahi: Drop macOS backend"), `drm_fourcc.h` is
unconditionally included, meaning these defines are now dead code.

Fixes: afe134a49c5ef79ca612 ("asahi: Drop macOS backend")
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23773>

16 months agoaco: don't set exec_hi for wave32 scan reductions
Rhys Perry [Tue, 20 Jun 2023 13:31:55 +0000 (14:31 +0100)]
aco: don't set exec_hi for wave32 scan reductions

fossil-db (wave32):
Totals from 21 (0.02% of 133428) affected shaders:
Instrs: 10778 -> 10712 (-0.61%)
CodeSize: 56604 -> 56208 (-0.70%)
Latency: 168293 -> 168251 (-0.02%)
InvThroughput: 25256 -> 25253 (-0.01%)

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/23745>

16 months agopvr: Fix csb control stream extension
Karmjit Mahil [Tue, 6 Jun 2023 10:51:01 +0000 (11:51 +0100)]
pvr: Fix csb control stream extension

Previously we reserved space for a stream link and whenever we ran
out of space in the current bo, allocated a new one, and emitted a
link to it. This is problematic as stream links can only be emitted
at state update boundaries so the handling could have produced a
corrupted control stream.

That's fixed by using a `relocation_mark` set by the driver to
indicate where a state update was last started, so csb can relocate
the whole update into the new bo and link to it.

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/23520>

16 months agointel/fs: Constant propagate into SHADER_OPCODE_SHUFFLE
Ian Romanick [Wed, 7 Jun 2023 17:57:47 +0000 (10:57 -0700)]
intel/fs: Constant propagate into SHADER_OPCODE_SHUFFLE

Code already exists to convert SHADER_OPCODE_SHUFFLE into a simple MOV
when either source is constant. However... the constants have to
actually get into those sources!

On a shader that I'm working on that multiplies very large matrices using
lots of subgroup operations,

-SIMD8 shader: 1378 instructions. 3 loops. 793896 cycles. 0:0 spills:fills, 23 sends, scheduled with mode non-lifo. Promoted 0 constants. Compacted 22048 to 21664 bytes (2%)
+SIMD8 shader: 346 instructions. 3 loops. 61742 cycles. 0:0 spills:fills, 23 sends, scheduled with mode top-down. Promoted 0 constants. Compacted 5536 to 5216 bytes (6%)

No changes in shader-db or fossil-db on any Intel platform.

v2: Merge a bunch of identical cases. Suggested by Ken.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> [v1]
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23609>

16 months agopvr: Fix dynamic offset patching
Karmjit Mahil [Fri, 9 Jun 2023 11:53:20 +0000 (12:53 +0100)]
pvr: Fix dynamic offset patching

Previously the set of dynamic offsets were being reused per each
binding. That's now fixed, by using an offset to determine where
each binding's dynamic offsets reside.

Tests fixed:
  dEQP-VK.binding_model.descriptor_copy.{compute,graphics}
    .{uniform,storage}_buffer_dynamic_0

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Fixes: aa791961a82e ("pvr: Add support for dynamic buffers descriptors")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23587>

16 months agopvr: Fix barrier insertion on merged subpasses
SoroushIMG [Thu, 15 Jun 2023 12:53:56 +0000 (13:53 +0100)]
pvr: Fix barrier insertion on merged subpasses

The driver can merge subpasses within a render pass into a single
hw render. While doing so it makes the assumption that the subpasses
in an hw render will all be submitted in a single job.

On vkCmdPipelineBarrier() the driver was previously incorrectly
inserting an event sub-cmd on a merged subpass, breaking that
assumption leading to incorrect values for input attachments.

Signed-off-by: Soroush Kashani <soroush.kashani@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Fixes: 6d672e033683 ("pvr: Add initial vkCmdPipelineBarrier skeleton.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23693>

16 months agopvr: Fix seg fault on empty descriptor set
Karmjit Mahil [Thu, 15 Jun 2023 14:47:38 +0000 (15:47 +0100)]
pvr: Fix seg fault on empty descriptor set

Vulkan allows empty descriptor sets to be created. When we setup
the descriptor set addresses table we fill in the address of the
`bo` for each valid/currently bound desc set. For empty desc sets
there is no `bo` which was causing a seg fault. Now skip them,
leaving their address set to `~0`.

Reported-by: Simon Perretta <simon.perretta@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Fixes: ce67f5ac944 ("pvr: Write descriptor set addrs table dev addr into shareds")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23692>

16 months agoradv: Move most of DB_SHADER_CONTROL to PS, more precise GFX11 blend WA
Vitaliy Triang3l Kuzmin [Mon, 3 Apr 2023 19:28:36 +0000 (22:28 +0300)]
radv: Move most of DB_SHADER_CONTROL to PS, more precise GFX11 blend WA

Move most of the DB_SHADER_CONTROL fields from the pipeline to the pixel
shader for preparation for shader objects.

Also, the GFX11 export conflict bug workaround doesn't need to be enabled
for non-1x sample counts or if blending is not enabled, so make the
application of DB_SHADER_CONTROL consider the current sample count and
blending state even if they're dynamic.

Having access to the exact sample count in DB_SHADER_CONTROL setup is also
necessary for good performance in SampleInterlock execution modes of
fragment shader interlock, for configuration of POPS_OVERLAP_NUM_SAMPLES
(GFX9-10.3) or OVERRIDE_INTRINSIC_RATE (GFX11), as PixelInterlock is
massively slower with multisampling due to overlap between adjacent
polygons sharing covered pixels among the common edge.

The name of the dynamic state controlling DB_SHADER_CONTROL is now
unambiguous - previously line rasterization mode had effect on attachment
feedback loop state emission.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23474>

16 months agoisl: add surface creation reporting mechanism
Lionel Landwerlin [Fri, 3 Dec 2021 10:11:02 +0000 (12:11 +0200)]
isl: add surface creation reporting mechanism

We have a number of users reporting surface creation issues with
modifiers etc...

This makes Anv & Iris printout the reason of the failure with
INTEL_DEBUG=isl Failure example in Iris :

MESA: debug: ISL surface failed: ../src/intel/isl/isl.c:1729: requested row pitch (42B) less than minimum alignment requirement (1024B) extent=160x160x1 dim=2d msaa=1x levels=1 rpitch=42 fmt=B8G8R8X8_UNORM usage=+rt+tex+disp

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14039>

16 months agoisl: assert on gfx8 condition that should not be met
Lionel Landwerlin [Wed, 14 Jun 2023 12:34:12 +0000 (15:34 +0300)]
isl: assert on gfx8 condition that should not be met

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14039>

16 months agoisl: assert on gfx7 condition that should not be met
Lionel Landwerlin [Thu, 21 Jul 2022 12:52:19 +0000 (15:52 +0300)]
isl: assert on gfx7 condition that should not be met

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14039>

16 months agoisl: assert on gfx6 condition that should not be met
Lionel Landwerlin [Mon, 7 Mar 2022 08:44:57 +0000 (10:44 +0200)]
isl: assert on gfx6 condition that should not be met

Those 2 cases should have been handled earlier.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14039>

16 months agozink: radv vangogh ci updates
Mike Blumenkrantz [Wed, 21 Jun 2023 11:57:38 +0000 (07:57 -0400)]
zink: radv vangogh ci updates

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>

16 months agozink: always clamp NUM_QUERIES to 500
Mike Blumenkrantz [Mon, 19 Jun 2023 20:55:36 +0000 (16:55 -0400)]
zink: always clamp NUM_QUERIES to 500

this avoids ooming on some weaker GPUs with big query energy

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>

16 months agozink: recache present semaphores
Mike Blumenkrantz [Wed, 14 Jun 2023 19:46:09 +0000 (15:46 -0400)]
zink: recache present semaphores

this otherwise depletes the entire cache

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>

16 months agozink: acquire persistently bound swapchain descriptors before setting usage
Mike Blumenkrantz [Mon, 19 Jun 2023 15:05:13 +0000 (11:05 -0400)]
zink: acquire persistently bound swapchain descriptors before setting usage

if a swapchain image is bound as a sampler across batches then it needs
to be acquired again before it is used

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>

16 months agozink: fix ubo array sizing in ntv
Mike Blumenkrantz [Mon, 19 Jun 2023 14:30:58 +0000 (10:30 -0400)]
zink: fix ubo array sizing in ntv

there are only 2 ubos that can be emitted, except the emitted ubos
can start at an offset based on the first-used ubo, which means this
has to support the full range of ubo indices

fixes oob access in game Beyond All Reason

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23729>

16 months agovulkan/video: consider removed bits when calculating the size of comsumed data.
Hyunjun Ko [Fri, 16 Jun 2023 06:12:27 +0000 (15:12 +0900)]
vulkan/video: consider removed bits when calculating the size of comsumed data.

Closes: mesa/mesa#9170

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23688>

16 months agoutil/rbsp: keep track of removed bits for the emulation
Hyunjun Ko [Fri, 16 Jun 2023 06:09:11 +0000 (15:09 +0900)]
util/rbsp: keep track of removed bits for the emulation
 prevention three bytes.

This is needed for the next patch to fix a way to get how much data
is comsumed in rbsp by considering cases of removed bits for emulation
prevention three bytes.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23688>

16 months agovulkan/video: move parsing longterm rps in h265 slice parsing.
Hyunjun Ko [Thu, 15 Jun 2023 06:41:20 +0000 (15:41 +0900)]
vulkan/video: move parsing longterm rps in h265 slice parsing.

It was just by mistake.

Fixes: efdcacb230 ("vulkan/video: add to parse h265 slice.")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23688>

16 months agovulkan/video: adds more conditions for setting loop_filter_across_slices_enable in...
Hyunjun Ko [Thu, 15 Jun 2023 06:38:18 +0000 (15:38 +0900)]
vulkan/video: adds more conditions for setting loop_filter_across_slices_enable in h265 slice parsing.

Fixes: efdcacb230 ("vulkan/video: add to parse h265 slice.")

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23688>

16 months agoradv/rt: Store the prolog outside the shaders array
Konstantin Seurer [Tue, 20 Jun 2023 16:19:57 +0000 (18:19 +0200)]
radv/rt: Store the prolog outside the shaders array

Avoids including it in executable statistics queries.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23524>

16 months agoradv: Use _mesa_shader_stage_to_string for executable name
Konstantin Seurer [Thu, 8 Jun 2023 14:07:41 +0000 (16:07 +0200)]
radv: Use _mesa_shader_stage_to_string for executable name

We can not use it for all stages because RADV has some special stages
and shader-db doesn't handle all stages.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23524>

16 months agoradv: Implement executable properties for ray tracing stages
Konstantin Seurer [Thu, 8 Jun 2023 13:58:19 +0000 (15:58 +0200)]
radv: Implement executable properties for ray tracing stages

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23524>

16 months agoradv: Use get_shader_from_executable_index for executable properties
Konstantin Seurer [Thu, 8 Jun 2023 13:25:24 +0000 (15:25 +0200)]
radv: Use get_shader_from_executable_index for executable properties

This will make handling ray tracing pipelines easier.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23524>

16 months agoradv: Adjust the traversal shader description
Konstantin Seurer [Thu, 8 Jun 2023 13:24:34 +0000 (15:24 +0200)]
radv: Adjust the traversal shader description

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23524>

16 months agoradv: Move the shader type to radv_shader_info
Konstantin Seurer [Thu, 8 Jun 2023 13:22:56 +0000 (15:22 +0200)]
radv: Move the shader type to radv_shader_info

Since the default value is 0, this removes some boilerplate.
Moving it to the shader info also makes it accessible using
radv_shader.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23524>

16 months agointel/compiler: add more validation for acc register usage
Tapani Pälli [Wed, 8 Mar 2023 11:21:48 +0000 (13:21 +0200)]
intel/compiler: add more validation for acc register usage

This is described in Wa_14014617373 and a programming note has
been added to specification.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23682>

16 months agoradv: enable NV_device_generated_commands on GFX6
Samuel Pitoiset [Tue, 20 Jun 2023 12:25:13 +0000 (14:25 +0200)]
radv: enable NV_device_generated_commands on GFX6

Now that GFX6 supports IBs, DGC can also be enabled.
Pass all vkd3d-proton tests on Pitcairn.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23689>

16 months agoradv: implement padding cmdbuffer for DGC on GFX6
Samuel Pitoiset [Tue, 20 Jun 2023 12:24:30 +0000 (14:24 +0200)]
radv: implement padding cmdbuffer for DGC on GFX6

GFX6 only supports PKT2_NOP_PAD.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23689>

16 months agoutil: Fixes prototype of threads_timespec_compare
Yonggang Luo [Tue, 20 Jun 2023 18:49:39 +0000 (02:49 +0800)]
util: Fixes prototype of threads_timespec_compare

using const struct timespec * is enough

Fixes: 45bd24708a9 ("c11: Improve mtx_timedlock to use timespec_get instead of time(NULL)")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9230

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23753>

16 months agoradv/video: drop incorrect defines for uapi ones.
Dave Airlie [Wed, 21 Jun 2023 00:33:32 +0000 (10:33 +1000)]
radv/video: drop incorrect defines for uapi ones.

I missed there's an off by one, and found the kernel defined
the correct bits, so just use that.

Fixes: 9477f117f4d4 ("radv/video: add initial frameworking.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23757>

16 months agointel/stub_gpu: Don't run program again after using GDB
Ian Romanick [Mon, 19 Jun 2023 23:28:23 +0000 (16:28 -0700)]
intel/stub_gpu: Don't run program again after using GDB

Fixes: c56dd678e48 ("intel/stub_gpu: add an option to launch valgrind")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23736>

16 months agoutil/blitter: fix util_blitter_clear_buffer() refcnt imbalance
Patrick Lerda [Tue, 13 Jun 2023 13:23:53 +0000 (15:23 +0200)]
util/blitter: fix util_blitter_clear_buffer() refcnt imbalance

Indeed, the vertex state was restored using a specific
condition at the util_blitter_restore_vertex_states()
level. This change ensures that the condition is the
same when the vertex state is saved.

The function util_blitter_clear_buffer() is only called
by the r600 driver on pre-evergreen gpus.

This issue is triggered on a rv770 gpu with "piglit/bin/fbo-1d -auto -fbo"
or "piglit/bin/draw_buffers_gles2 -auto -fbo"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: 5f566faa4607 ("radeonsi: don't save and restore vertex buffers and elements for u_blitter")
Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23721>

16 months agozink: only retry bo allocation after reclaim if reclaims actually happened
Mike Blumenkrantz [Wed, 3 May 2023 20:11:37 +0000 (16:11 -0400)]
zink: only retry bo allocation after reclaim if reclaims actually happened

this should cut down on allocation error spam

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23073>

16 months agoaux/pipebuffer: add a return to pb_cache_release_all_buffers()
Mike Blumenkrantz [Wed, 3 May 2023 20:10:08 +0000 (16:10 -0400)]
aux/pipebuffer: add a return to pb_cache_release_all_buffers()

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23073>

16 months agoaux/pipebuffer: add a return to pb_slabs_reclaim()
Mike Blumenkrantz [Wed, 3 May 2023 20:07:34 +0000 (16:07 -0400)]
aux/pipebuffer: add a return to pb_slabs_reclaim()

this lets drivers determine whether any reclaims have happened

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23073>

16 months agointel/compiler: Respect NIR_DEBUG_PRINT_INTERNAL flag
Caio Oliveira [Tue, 20 Jun 2023 21:42:02 +0000 (14:42 -0700)]
intel/compiler: Respect NIR_DEBUG_PRINT_INTERNAL flag

If flag is not set, don't print debugging
information for internal shaders.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23756>

16 months agonir/print: Print whether the shader is internal or not
Caio Oliveira [Tue, 20 Jun 2023 20:56:05 +0000 (13:56 -0700)]
nir/print: Print whether the shader is internal or not

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23756>

16 months agorusticl/memory: fix clippy errors
norablackcat [Tue, 20 Jun 2023 19:56:56 +0000 (13:56 -0600)]
rusticl/memory: fix clippy errors

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23755>

16 months agoaco/gfx11: schedule for VMEM store clauses
Rhys Perry [Wed, 7 Jun 2023 16:08:10 +0000 (17:08 +0100)]
aco/gfx11: schedule for VMEM store clauses

fossil-db (gfx1100):
Totals from 49486 (37.09% of 133428) affected shaders:
Instrs: 18376819 -> 18480712 (+0.57%); split: -0.00%, +0.57%
CodeSize: 91810836 -> 92227292 (+0.45%); split: -0.00%, +0.45%
VGPRs: 2031824 -> 2047784 (+0.79%); split: -0.02%, +0.81%
Latency: 104259318 -> 103804792 (-0.44%); split: -0.44%, +0.00%
InvThroughput: 16388760 -> 16399819 (+0.07%); split: -0.13%, +0.19%
VClause: 568844 -> 432401 (-23.99%)
Copies: 1197942 -> 1231202 (+2.78%); split: -0.08%, +2.86%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23505>

16 months agoaco/gfx11: use s_clause with stores
Rhys Perry [Wed, 7 Jun 2023 16:33:46 +0000 (17:33 +0100)]
aco/gfx11: use s_clause with stores

fossil-db (gfx1100):
Totals from 3535 (2.65% of 133428) affected shaders:
Instrs: 1963996 -> 1968979 (+0.25%)
CodeSize: 10077784 -> 10097716 (+0.20%)
Latency: 13264216 -> 13264741 (+0.00%)
InvThroughput: 2995676 -> 3004083 (+0.28%); split: -0.00%, +0.28%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23505>

16 months agoaco: don't try to form load+store clauses
Rhys Perry [Wed, 7 Jun 2023 16:00:12 +0000 (17:00 +0100)]
aco: don't try to form load+store clauses

fossil-db (gfx1100):
Totals from 79 (0.06% of 133428) affected shaders:
MaxWaves: 1484 -> 1408 (-5.12%)
Instrs: 216290 -> 216255 (-0.02%); split: -0.04%, +0.03%
CodeSize: 1149288 -> 1149148 (-0.01%); split: -0.03%, +0.02%
VGPRs: 7384 -> 7840 (+6.18%)
Latency: 3303521 -> 3305077 (+0.05%); split: -0.05%, +0.10%
InvThroughput: 2716621 -> 2719973 (+0.12%); split: -0.01%, +0.13%
VClause: 5605 -> 6170 (+10.08%)
SClause: 3005 -> 2983 (-0.73%); split: -0.77%, +0.03%
Copies: 33428 -> 33490 (+0.19%); split: -0.07%, +0.26%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23505>

16 months agozink: fix anv ci flake wildcarding
Mike Blumenkrantz [Tue, 20 Jun 2023 17:51:29 +0000 (13:51 -0400)]
zink: fix anv ci flake wildcarding

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23751>