platform/upstream/mesa.git
2 years agonir: remove gl_PrimitiveID output from MS when it's not used in FS
Marcin Ślusarz [Fri, 11 Mar 2022 10:01:38 +0000 (11:01 +0100)]
nir: remove gl_PrimitiveID output from MS when it's not used in FS

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15340>

2 years agoanv: initialize 3DMESH_1D.ExtendedParameter0 when ExtendedParameter0Present
Marcin Ślusarz [Fri, 8 Apr 2022 08:58:33 +0000 (10:58 +0200)]
anv: initialize 3DMESH_1D.ExtendedParameter0 when ExtendedParameter0Present

When IndirectParameterEnable==true it's not actually used by the hardware,
but if it's not initialized and INTEL_DEBUG=bat is set, then Valgrind complains.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15850>

2 years agoanv: fix push constant lowering for task/mesh
Marcin Ślusarz [Tue, 5 Apr 2022 14:41:44 +0000 (16:41 +0200)]
anv: fix push constant lowering for task/mesh

Fixes: a6031cd9bd4 ("anv: fix push constant lowering with bindless shaders")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15850>

2 years agoglsl/st: use nir pass to lower indirect rather than GLSL IR
Timothy Arceri [Tue, 12 Apr 2022 01:23:31 +0000 (11:23 +1000)]
glsl/st: use nir pass to lower indirect rather than GLSL IR

Will allow us to drop more GLSL IR code in future once we switch
all drivers to NIR. Also stops the need for all drivers to call
this pass to remove indirect temps that may have been added during
the NIR varying linking lowering/optimisations.

This patch fixes some tests on i915, d3d12, lima and vc4.

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15871>

2 years agoradv: add few helpers to deal with pipeline layout
Samuel Pitoiset [Mon, 11 Apr 2022 10:13:13 +0000 (12:13 +0200)]
radv: add few helpers to deal with pipeline layout

With VK_EXT_graphics_pipeline_library, we will have to support
independent sets and also to merge sets from different libraries.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15849>

2 years agoradv: remove unused radv_pipeline_layout::size field
Samuel Pitoiset [Mon, 11 Apr 2022 08:51:49 +0000 (10:51 +0200)]
radv: remove unused radv_pipeline_layout::size field

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15849>

2 years agoradv: drop the remaining uses of shader modules
Samuel Pitoiset [Fri, 8 Apr 2022 14:41:28 +0000 (16:41 +0200)]
radv: drop the remaining uses of shader modules

With VK_EXT_graphics_pipeline_library, shader modules can be NULL and
be passed via the pNext of VkPipelineShaderStageCreateInfo. To prepare
for this, just store everything we need to radv_pipeline_stage.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15847>

2 years agoradv: store the shader sha1 to radv_pipeline_stage
Samuel Pitoiset [Fri, 8 Apr 2022 13:55:19 +0000 (15:55 +0200)]
radv: store the shader sha1 to radv_pipeline_stage

To remove use of shader modules completely in the next commit.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15847>

2 years agoradv: replace convert_rt_stage() by vk_to_mesa_shader_stage()
Samuel Pitoiset [Fri, 8 Apr 2022 14:28:26 +0000 (16:28 +0200)]
radv: replace convert_rt_stage() by vk_to_mesa_shader_stage()

Mesa shader stages are correctly sorted.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15847>

2 years agonine: check hardware support before using vertex texture
Pavel Ondračka [Mon, 11 Apr 2022 19:03:25 +0000 (21:03 +0200)]
nine: check hardware support before using vertex texture

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15864>

2 years agozink: create pipeline layout if only bindless descriptor set is used
Mike Blumenkrantz [Mon, 11 Apr 2022 19:07:50 +0000 (15:07 -0400)]
zink: create pipeline layout if only bindless descriptor set is used

bindless descriptors are descriptors too.

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15853>

2 years agozink: handle 0 ubos and 0 ssbos in pipeline layout
Mike Blumenkrantz [Mon, 11 Apr 2022 19:07:11 +0000 (15:07 -0400)]
zink: handle 0 ubos and 0 ssbos in pipeline layout

this is the number of types needed, and it can be zero

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15853>

2 years agozink: prune unused st-injected pointsize exports
Mike Blumenkrantz [Fri, 8 Apr 2022 13:18:17 +0000 (09:18 -0400)]
zink: prune unused st-injected pointsize exports

only the last vertex stage needs to keep these, so prune any that aren't
being weirdly passed through

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15853>

2 years agozink: try copy region first for non-resolve blits
Mike Blumenkrantz [Tue, 1 Mar 2022 16:59:48 +0000 (11:59 -0500)]
zink: try copy region first for non-resolve blits

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15853>

2 years agozink: refactor copy_region path in zink_blit to util function
Mike Blumenkrantz [Wed, 30 Mar 2022 20:48:22 +0000 (16:48 -0400)]
zink: refactor copy_region path in zink_blit to util function

no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15853>

2 years agodraw: handle tess eval shader when getting num outputs
Dave Airlie [Tue, 12 Apr 2022 03:03:44 +0000 (13:03 +1000)]
draw: handle tess eval shader when getting num outputs

This tripped up some pointsize/prim id interactions with zink.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15872>

2 years agoturnip: Move autotune buffers to suballoc.
Emma Anholt [Fri, 18 Mar 2022 17:31:12 +0000 (10:31 -0700)]
turnip: Move autotune buffers to suballoc.

Now the ANGLE trex_200 trace replay does a single BO allocation at startup
for autotune results instead of one per frame (~350 for the whole replay).

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

2 years agoturnip: Get autotune off of ralloc destructors.
Emma Anholt [Fri, 18 Mar 2022 17:58:38 +0000 (10:58 -0700)]
turnip: Get autotune off of ralloc destructors.

We've wanted to remove destructors from ralloc's API for a long time (it's
an extra storage cost per ralloc for a rarely-used feature), and for the
suballoc change we'd need to spend more storage on storing the tu_device
pointer per result since destructors don't get anything else but the
pointer passed into them.

Fixes use-after-frees:

=================================================================
==2383==ERROR: AddressSanitizer: heap-use-after-free on address 0xffff88fe1940 at pc 0xffff934f427c bp 0xfffff5481e90 sp 0xfffff5481ea8
WRITE of size 8 at 0xffff88fe1940 thread T0
    #0 0xffff934f4278 in list_del ../src/util/list.h:108
    #1 0xffff934f4278 in result_destructor ../src/freedreno/vulkan/tu_autotune.c:237
    #2 0xffff9377793c in unsafe_free ../src/util/ralloc.c:300
    #3 0xffff9377793c in ralloc_free ../src/util/ralloc.c:265
    #4 0xffff934f4368 in history_destructor ../src/freedreno/vulkan/tu_autotune.c:229
    #5 0xffff9377793c in unsafe_free ../src/util/ralloc.c:300
    #6 0xffff9377793c in ralloc_free ../src/util/ralloc.c:265
    #7 0xffff934f5990 in tu_autotune_on_submit ../src/freedreno/vulkan/tu_autotune.c:442
[...]

0xffff88fe1940 is located 80 bytes inside of 112-byte region [0xffff88fe18f0,0xffff88fe1960)
freed by thread T0 here:
    #0 0xffff9c1c90d8 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:127
    #1 0xffff934f4368 in history_destructor ../src/freedreno/vulkan/tu_autotune.c:229
    #2 0xffff9377793c in unsafe_free ../src/util/ralloc.c:300
    #3 0xffff9377793c in ralloc_free ../src/util/ralloc.c:265
    #4 0xffff934f5990 in tu_autotune_on_submit ../src/freedreno/vulkan/tu_autotune.c:442
    #5 0xffff935cf2ac in tu_queue_submit_locked ../src/freedreno/vulkan/tu_drm.c:997
[...]

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

2 years agoturnip: Reduce the pipeline's CS allocation a bit.
Emma Anholt [Wed, 23 Feb 2022 22:45:59 +0000 (14:45 -0800)]
turnip: Reduce the pipeline's CS allocation a bit.

We don't return unused space to the suballocator, so it's a little useful
to limit how much we overallocate to reduce memory footprint.  I took a
look through the tu_cs_emit_array() calls and accounted for a couple of
them in the variant-specific space calculation, then dropped the base
allocation by factors of 2 until we started throwing asserts.

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

2 years agoturnip: Skip telling the kernel the BO list when we don't need any.
Emma Anholt [Thu, 17 Feb 2022 21:24:20 +0000 (13:24 -0800)]
turnip: Skip telling the kernel the BO list when we don't need any.

In fencing, we sometimes do a dummy submit with no nr_cmds.  If we don't
have commands to execute, we don't need to pin or fence any BOs either.

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

2 years agoturnip: Sub-allocate pipelines out of a device-global BO pool.
Emma Anholt [Mon, 14 Feb 2022 22:45:01 +0000 (14:45 -0800)]
turnip: Sub-allocate pipelines out of a device-global BO pool.

Allocating a BO for each pipeline meant that for apps with many pipelines
(such as Asphalt9 under ANGLE), we would end up spending too much time in
the kernel tracking the BO references.

Looking at CS:Source on zink, before we had 85 BOs for the pipelines for a
total of 1036 kb, and now we have 7 BOs for a total of 896 kb.

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

2 years agoturnip: Stop allocating unused pvtmem space in the pipeline CS.
Emma Anholt [Tue, 15 Feb 2022 21:52:15 +0000 (13:52 -0800)]
turnip: Stop allocating unused pvtmem space in the pipeline CS.

The pvtmem was split off to a separate read/write BO.

Fixes: 931ad19a1817 ("turnip: make cmdstream bo's read-only to GPU")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15038>

2 years agoturnip: Track refcounts on BOs in kgsl as well.
Emma Anholt [Wed, 6 Apr 2022 20:05:40 +0000 (13:05 -0700)]
turnip: Track refcounts on BOs in kgsl as well.

I'm going to be using the BO refcount for the pipeline and autotune buffer
suballocation.

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

2 years agointel/perf: Fix OA report accumulation on Gfx12+.
Francisco Jerez [Mon, 4 Apr 2022 22:45:54 +0000 (15:45 -0700)]
intel/perf: Fix OA report accumulation on Gfx12+.

The intel_perf_query path used for performance queries on GL was
passing a bogus "end" pointer to intel_perf_query_result_accumulate(),
causing it to accumulate garbage values.  This was causing the values
of many performance counters to be corrupted.

The "end" pointer was incorrect because the current code was assuming
that different OA reports were located TOTAL_QUERY_DATA_SIZE bytes
apart, which is a hard-coded preprocessor define.  However recent
(Gfx12+) hardware generations use a variable query size determined by
the query layout.  Use the size derived from it instead, and remove
the stale define.

Fixes: 3c513250255d6a ("intel/perf: switch query code to use query layout")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15783>

2 years agozink/query: refactor out vk queries and allow sharing them
Dave Airlie [Mon, 4 Apr 2022 06:21:41 +0000 (16:21 +1000)]
zink/query: refactor out vk queries and allow sharing them

gallium queries have to be mapped onto multiple vulkan queries,
this can happen for two reasons.

1. primitives generated and overflow any don't map directly, and
multiple vulkan queries are needs per iteration. These are stored
inside the "starts" as zink_vk_query ptrs.

2. suspending/resuming queries uses multiple queries, these are
the "starts". Every suspend/resume cycle adds a new start.

Vulkan also requires that multiple queries of the same time don't
execute at once, which affects the overflow any vs xfb normal
queries, so vk_query structs are refcounted and can be shared
between starts. Due to this when the draw state changes, it's
simple to just suspend/resume all queries so the shared vulkan
queries get handled properly.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15785>

2 years agor300: move pointer dereference after a NULL check
Pavel Ondračka [Sun, 10 Apr 2022 16:57:56 +0000 (18:57 +0200)]
r300: move pointer dereference after a NULL check

Vs state can be NULL by the time r300_set_constant_buffer is called.
We don't hit this with OpenGL though, so this is why I didn't spot
this in my testing, but nine hits this codepath. Restore the original
behavior here.

Fixes: 882811b1ff67fa37197e27f56caaffbe3e6164d6
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15842>

2 years agozink: add issue notes for remaining radv fails
Mike Blumenkrantz [Mon, 11 Apr 2022 19:57:16 +0000 (15:57 -0400)]
zink: add issue notes for remaining radv fails

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

2 years agollvmpipe: remove unused array
Jocelyn Falempe [Wed, 6 Apr 2022 15:21:22 +0000 (17:21 +0200)]
llvmpipe: remove unused array

chans variable doesn't need to be an array.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6204
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15556>

2 years agollvmpipe: fix color rendering on big endian.
Jocelyn Falempe [Thu, 24 Mar 2022 21:55:05 +0000 (22:55 +0100)]
llvmpipe: fix color rendering on big endian.

Some colors were missing/inverted on big endian machine(s390x).
because blend_type.length > src_fmt->nr_channels.
In my case, blend_type has 4 channels (rgba) but src_fmt has only 3.

So the from_lsb was wrong by 1, and channels got messed up.
(blue was always 255, green -> red, and blue -> green).

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6204
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15556>

2 years agozink: update radv piglit baseline
Mike Blumenkrantz [Mon, 11 Apr 2022 18:29:08 +0000 (14:29 -0400)]
zink: update radv piglit baseline

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

2 years agointel/genxml: Add SAMPLER_MODE bits for enabling Small PL on Icelake
Kenneth Graunke [Tue, 17 Dec 2019 22:16:01 +0000 (14:16 -0800)]
intel/genxml: Add SAMPLER_MODE bits for enabling Small PL on Icelake

This enables a lower power mode in the sampler hardware in certain
common scenarios.  On Tigerlake, SAMPLER_MODE is not programmable by
userspace but the kernel already sets this bit for us.

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

2 years agointel/genxml: Delete SAMPLER_MODE register definition on Gfx12+
Kenneth Graunke [Tue, 29 Mar 2022 06:14:23 +0000 (23:14 -0700)]
intel/genxml: Delete SAMPLER_MODE register definition on Gfx12+

While this register still exists, it's no longer a per-context register.
Instead, on Gfx12+, SAMPLER_MODE exists per dual-subslice and is
accessed as a "multicast" register, where you write control which
version is accessed by the "steering control register".

At any rate, userspace cannot write it any longer, and so there's not
much point to it existing in our genxml (which was missing most of the
fields anyway).

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

2 years agointel/genxml: Add new "Low Quality Filter" field on Gfx12+.
Kenneth Graunke [Wed, 24 Jun 2020 23:50:19 +0000 (16:50 -0700)]
intel/genxml: Add new "Low Quality Filter" field on Gfx12+.

This allows the sampler to perform faster filtering of 8-bit UNORM
textures by filtering them at a different precision.  The filtering
is intended to still be OpenGL and DirectX spec compliant.

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

2 years agointel/genxml: Add SAMPLER_STATE::Allow Low Quality LOD Calculation field
Kenneth Graunke [Wed, 24 Jun 2020 23:47:03 +0000 (16:47 -0700)]
intel/genxml: Add SAMPLER_STATE::Allow Low Quality LOD Calculation field

This allows the hardware to perform a faster LOD calculation in many
simple cases.

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

2 years agoci: enable v3dv arm64 jobs
Juan A. Suarez Romero [Mon, 11 Apr 2022 08:35:35 +0000 (10:35 +0200)]
ci: enable v3dv arm64 jobs

This reverts commit f567a832eed19cf01bb5f38e662f5ed53a8ac47f.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15856>

2 years agozink: reorganize radv ci baseline
Mike Blumenkrantz [Mon, 11 Apr 2022 13:15:11 +0000 (09:15 -0400)]
zink: reorganize radv ci baseline

categorize known fails and move remainder to top of file for better
visibility

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

2 years agozink: update radv ci baseline
Mike Blumenkrantz [Mon, 11 Apr 2022 13:12:08 +0000 (09:12 -0400)]
zink: update radv ci baseline

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

2 years agodzn: Fix loop condition in dzn_descriptor_set_copy()
Boris Brezillon [Fri, 8 Apr 2022 19:02:56 +0000 (12:02 -0700)]
dzn: Fix loop condition in dzn_descriptor_set_copy()

We need to make sure we still have descriptors to copy in the
while() condition. While at it, drop the assert() checking that
the number of descriptors already copied is less than the
requested number.

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

2 years agozink: only do swapchain update during fb setup if swapchain is active
Mike Blumenkrantz [Thu, 7 Apr 2022 21:06:17 +0000 (17:06 -0400)]
zink: only do swapchain update during fb setup if swapchain is active

otherwise this explodes blitter operations

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15809>

2 years agoutil: Convert util/u_printf.cpp to util/u_printf.c
Yonggang Luo [Tue, 29 Mar 2022 22:54:45 +0000 (06:54 +0800)]
util: Convert util/u_printf.cpp to util/u_printf.c

By doing this to remove the need of C++ runtime when not using llvmpipe

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15659>

2 years agoutil: Add tests for u_printf.h
Yonggang Luo [Wed, 30 Mar 2022 18:58:48 +0000 (02:58 +0800)]
util: Add tests for u_printf.h

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Mihai Preda <mhpreda@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15659>

2 years agozink: force texture barriers when performing in-renderpass clears
Mike Blumenkrantz [Fri, 8 Apr 2022 22:46:50 +0000 (18:46 -0400)]
zink: force texture barriers when performing in-renderpass clears

according to spec, a barrier is required any time the pixels of the
framebuffer are changed. since zink defers clears and runs them at
a later time, it must also be responsible for handling the required
synchronization for such operations

fixes (radv):
KHR-GL46.blend_equation_advanced.blend_all*

fixes #5572

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15831>

2 years agozink: rework texture_barrier hook
Mike Blumenkrantz [Fri, 8 Apr 2022 22:44:15 +0000 (18:44 -0400)]
zink: rework texture_barrier hook

according to spec, for fbfetch this should match the subpass self-dependency of
* stage   FRAGMENT_STAGE -> FRAGMENT_STAGE
* access  0 -> INPUT_ATTACHMENT_READ

zs fbfetch doesn't seem to be a thing, so that code is left for historical
and/or future purposes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15831>

2 years agozink: add a self-dependency for fbfetch renderpasses
Mike Blumenkrantz [Fri, 8 Apr 2022 22:41:48 +0000 (18:41 -0400)]
zink: add a self-dependency for fbfetch renderpasses

it's necessary to have a self-dependency here so that texture barriers
can be emitted during the renderpass to enable fbfetch

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15831>

2 years agozink: remove compiled conditional for lavapipe usage
Mike Blumenkrantz [Mon, 11 Apr 2022 00:19:06 +0000 (20:19 -0400)]
zink: remove compiled conditional for lavapipe usage

this is super annoying since it means that a build of zink cannot
be mix-and-matched with an existing build of lavapipe, e.g., for faster
bisecting

the env var should be sufficient to handle this, and if someone sets it
and doesn't have swrast enabled then they can deal with it

Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15844>

2 years agozink: fix tessellation shader key matching.
Dave Airlie [Sun, 10 Apr 2022 23:32:41 +0000 (09:32 +1000)]
zink: fix tessellation shader key matching.

I happened to run heaven with tess enabled on zink and was seeing 6fps,
and lots of shader recompiles, turns out the tess shader key was
never getting matched properly.

Fixes: 62b8daa889da ("zink: set shader key size to 0 for non-generated tcs")
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15843>

2 years agozink only use zs-specific layout for zs attachments
Mike Blumenkrantz [Fri, 8 Apr 2022 19:49:08 +0000 (15:49 -0400)]
zink only use zs-specific layout for zs attachments

otherwise this is illegal

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15833>

2 years agozink: clamp cube size queries to 2 return components
Mike Blumenkrantz [Fri, 8 Apr 2022 19:45:06 +0000 (15:45 -0400)]
zink: clamp cube size queries to 2 return components

more validation spam eliminated

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15833>

2 years agoutil/hash_table: Remove Unicode byte order mark
Icecream95 [Mon, 4 Apr 2022 01:02:40 +0000 (13:02 +1200)]
util/hash_table: Remove Unicode byte order mark

The mark can confuse utilities which do not support Unicode, and no
other file has the character.

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

2 years agozink: ci updates
Mike Blumenkrantz [Sat, 9 Apr 2022 13:27:28 +0000 (09:27 -0400)]
zink: ci updates

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

2 years agomesa/st: handle adding pointsize when gl_Position is never written
Mike Blumenkrantz [Fri, 8 Apr 2022 16:45:22 +0000 (12:45 -0400)]
mesa/st: handle adding pointsize when gl_Position is never written

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

2 years agonir/lower_point_size_mov: handle case where gl_Position isn't written
Mike Blumenkrantz [Fri, 8 Apr 2022 16:45:06 +0000 (12:45 -0400)]
nir/lower_point_size_mov: handle case where gl_Position isn't written

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

2 years agomesa/st: handle copy_deref cases for adding pointsize
Mike Blumenkrantz [Fri, 8 Apr 2022 15:36:14 +0000 (11:36 -0400)]
mesa/st: handle copy_deref cases for adding pointsize

these may not have been lowered yet

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

2 years agomesa/st: fix pointsize adding check
Mike Blumenkrantz [Fri, 8 Apr 2022 15:00:39 +0000 (11:00 -0400)]
mesa/st: fix pointsize adding check

* components is already multiplied by 4
* also verify base maxcomponents for gs

fixes #6282

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

2 years agomesa: set PointSizeIsOne on context creation
Mike Blumenkrantz [Fri, 8 Apr 2022 14:59:38 +0000 (10:59 -0400)]
mesa: set PointSizeIsOne on context creation

forgot to add this when inverting the flag's meaning previously

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

2 years agoci: disable v3dv arm64 jobs
Mike Blumenkrantz [Sun, 10 Apr 2022 16:25:02 +0000 (12:25 -0400)]
ci: disable v3dv arm64 jobs

these have been broken for almost 48 hours

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15841>

2 years agopanfrost: Remove BO mapping from import
Icecream95 [Fri, 8 Apr 2022 11:05:02 +0000 (23:05 +1200)]
panfrost: Remove BO mapping from import

BOs will be mapped when needed, so there is no need to mmap BOs when
importing them.

Fixes crashes when exporting a non-AFBC resource and importing it back
in the same context.

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

2 years agoamd/llvm: Transition to LLVM "opaque pointers"
Mihai Preda [Mon, 4 Apr 2022 07:07:49 +0000 (10:07 +0300)]
amd/llvm: Transition to LLVM "opaque pointers"

For context, see LLVM opaque pointers:
https://llvm.org/docs/OpaquePointers.html
https://llvm.org/devmtg/2015-10/slides/Blaikie-OpaquePointerTypes.pdf

This fixes the deprecation warnings in src/amd/llvm only.

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

2 years agoci/zink: Mark a new GLX flake that hit an innocent MR.
Emma Anholt [Fri, 8 Apr 2022 23:23:34 +0000 (16:23 -0700)]
ci/zink: Mark a new GLX flake that hit an innocent MR.

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

2 years agovenus: prepare and feed renderer protocol info into cs
Yiwei Zhang [Tue, 22 Mar 2022 20:39:06 +0000 (20:39 +0000)]
venus: prepare and feed renderer protocol info into cs

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15495>

2 years agovenus: update protocol for mask helper and ignore renderer unknown pNext
Yiwei Zhang [Sat, 26 Mar 2022 04:27:04 +0000 (04:27 +0000)]
venus: update protocol for mask helper and ignore renderer unknown pNext

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15495>

2 years agovenus: add cs helper stubs to be used by protocol
Yiwei Zhang [Tue, 22 Mar 2022 20:34:41 +0000 (20:34 +0000)]
venus: add cs helper stubs to be used by protocol

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15495>

2 years agovenus: store extension mask in renderer info
Yiwei Zhang [Fri, 18 Mar 2022 07:08:10 +0000 (07:08 +0000)]
venus: store extension mask in renderer info

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15495>

2 years agoci/softpipe: Mark some flakes that have appeared across a few MRs.
Emma Anholt [Fri, 8 Apr 2022 23:27:51 +0000 (16:27 -0700)]
ci/softpipe: Mark some flakes that have appeared across a few MRs.

This MR got hit by one, so I checked the logs for the recent NEW flakes.

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

2 years agost/glsl-to-tgsi: Fix handling of csel(bool, vec, vec).
Emma Anholt [Thu, 24 Mar 2022 04:12:47 +0000 (21:12 -0700)]
st/glsl-to-tgsi: Fix handling of csel(bool, vec, vec).

We were throwing an assertion failure across shader-db on nv92.  I'm
guessing this is a regression from !14573.

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

2 years agoci/crocus: Disable pixmark-piano trace testing.
Emma Anholt [Fri, 8 Apr 2022 22:51:39 +0000 (15:51 -0700)]
ci/crocus: Disable pixmark-piano trace testing.

It hangchecked for me on hsw recently, too.

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

2 years agoci/iris: Disable pixmark-piano trace testing.
Emma Anholt [Fri, 8 Apr 2022 22:50:24 +0000 (15:50 -0700)]
ci/iris: Disable pixmark-piano trace testing.

It gave me a spurious hangcheck on
https://gitlab.freedesktop.org/mesa/mesa/-/jobs/20946403, and this trace
causes trouble for a lot of drivers so just disable it on all iris.

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

2 years agotgsi/transform: Drop a stale comment.
Emma Anholt [Wed, 6 Apr 2022 23:17:00 +0000 (16:17 -0700)]
tgsi/transform: Drop a stale comment.

This method returns void.

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

2 years agotgsi/transform: Make tgsi_transform_shader() manage token allocation.
Emma Anholt [Wed, 6 Apr 2022 22:14:08 +0000 (15:14 -0700)]
tgsi/transform: Make tgsi_transform_shader() manage token allocation.

Previously, the caller allocated storage and tgsi_transform_shader() would
emit into that, returning how many tokens it emitted.  All the callers had
to guess at how much storage was necessary, trying not to over-allocate
but also getting enough that you wouldn't (effectively) silently run out
of space.

Instead, make tgsi_transform_shader() do the allocation for you, taking
just a hint of how much space you think you need, and internally double
size when necessary.  Fixes failures on virgl with fp64 since we've added
more fp64 virglrenderer workarounds and its old "XXX: is this enough?"
allocation wasn't any more.

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

2 years agonir_to_tgsi: Fix the address reg mapping for images and SSBOs to match G-T-T.
Emma Anholt [Thu, 7 Apr 2022 22:26:46 +0000 (15:26 -0700)]
nir_to_tgsi: Fix the address reg mapping for images and SSBOs to match G-T-T.

I missed these in the previous fix to mimic GLSL-to-TGSI address reg
behavior, which r600 relies on.

Fixes: 4bb9c0a28a5f ("nir_to_tgsi: Use the same address reg mappings as GLSL-to-TGSI did.")

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

2 years agonir_to_tgsi: Extract const components of atomic counter offsets into Index.
Emma Anholt [Tue, 5 Apr 2022 16:45:36 +0000 (09:45 -0700)]
nir_to_tgsi: Extract const components of atomic counter offsets into Index.

virglrenderer maps atomic accesses to atomic counter declarations using
the .Index field.  We were previously emitting a .Index of 0 for array
accesses, so virglrenderer would emit
atomicIncrement(first_counter[counter_offset+array_index]).  This would
mostly work because hardware doesn't care about the bounds of counter
declarations, but if the first counter was a non-array, then the [] GLSL
emit gets dropped (can't array access a scalar!) and you'd access the
non-array first_counter instead.

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

2 years agor600: Add a helper function for rat_index_mode, with documentation and assert.
Emma Anholt [Thu, 7 Apr 2022 22:15:03 +0000 (15:15 -0700)]
r600: Add a helper function for rat_index_mode, with documentation and assert.

We have some special requirements on the address regs of our incoming
TGSI, which nir_to_tgsi violated.

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

2 years agor600: Stop using ArrayID to look up atomic counters.
Emma Anholt [Thu, 7 Apr 2022 19:02:43 +0000 (12:02 -0700)]
r600: Stop using ArrayID to look up atomic counters.

Even if you find a matching array ID, you still need to offset by Index
compared to .start, so the ArrayID lookup didn't help.

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

2 years agozink/kopper: don't use generated include in kopper interface
Mike Blumenkrantz [Fri, 8 Apr 2022 20:32:40 +0000 (16:32 -0400)]
zink/kopper: don't use generated include in kopper interface

this causes build race conditions

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15830>

2 years agozink: don't generate VK_ACCESS_SHADER_READ_BIT barrier for vertex inputs
Mike Blumenkrantz [Fri, 8 Apr 2022 14:13:56 +0000 (10:13 -0400)]
zink: don't generate VK_ACCESS_SHADER_READ_BIT barrier for vertex inputs

this is both redundant and illegal

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15827>

2 years agozink: don't rely on implicit access for generated barriers
Mike Blumenkrantz [Fri, 8 Apr 2022 14:26:37 +0000 (10:26 -0400)]
zink: don't rely on implicit access for generated barriers

compute shaders will get this wrong, so calculate access manually
using binding info

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15827>

2 years agozink: add handling for !sync2 in renderpass dependencies
Mike Blumenkrantz [Fri, 8 Apr 2022 14:19:55 +0000 (10:19 -0400)]
zink: add handling for !sync2 in renderpass dependencies

src/dst stage can't be zero without sync2

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15827>

2 years agozink: hook up sync2 extension
Mike Blumenkrantz [Fri, 8 Apr 2022 14:19:18 +0000 (10:19 -0400)]
zink: hook up sync2 extension

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15827>

2 years agozink: bitcast InterpolateAtOffset offset to fvec
Mike Blumenkrantz [Fri, 8 Apr 2022 17:03:25 +0000 (13:03 -0400)]
zink: bitcast InterpolateAtOffset offset to fvec

required by spec

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15827>

2 years agozink: clamp out partial texels when creating bufferviews
Mike Blumenkrantz [Fri, 8 Apr 2022 17:24:32 +0000 (13:24 -0400)]
zink: clamp out partial texels when creating bufferviews

this is an illegal alignment, so clamp the range to the nearest
texel offset since the shader should be hitting the robustness
case for the partial texel

affects:
dEQP-GLES31.functional.texture.texture_buffer.modify.mapbuffer_readwrite.range_size_65537

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15827>

2 years agozink: only get swapchain present semaphore on batch flush if not presented
Mike Blumenkrantz [Fri, 8 Apr 2022 13:51:57 +0000 (09:51 -0400)]
zink: only get swapchain present semaphore on batch flush if not presented

otherwise this has already been present-waited and can just be used whenever

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15820>

2 years agozink: only get swapchain present semaphore on batch flush after acquire
Mike Blumenkrantz [Fri, 8 Apr 2022 13:51:57 +0000 (09:51 -0400)]
zink: only get swapchain present semaphore on batch flush after acquire

otherwise this was a no-op flush from the frontend that should be ignored

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15820>

2 years agozink: unset deferred present barrier on flush
Mike Blumenkrantz [Fri, 8 Apr 2022 13:33:37 +0000 (09:33 -0400)]
zink: unset deferred present barrier on flush

don't need to flush this every frame

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15820>

2 years agozink: only trigger deferred present barrier if swapchain has acquired
Mike Blumenkrantz [Fri, 8 Apr 2022 13:28:52 +0000 (09:28 -0400)]
zink: only trigger deferred present barrier if swapchain has acquired

otherwise this was just pointlessly flushed by the frontend and
can be ignored

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15820>

2 years agoradv: use flush vgt streamout like PAL does.
Dave Airlie [Fri, 8 Apr 2022 01:45:11 +0000 (11:45 +1000)]
radv: use flush vgt streamout like PAL does.

This uses WRITE_DATA on the ME engine to reset the register, to match what
PAL does on GFX9+.

This fixes
KHR-GL45.transform_feedback_overflow_query_ARB.multiple-streams-one-buffer-per-stream
on zink/radv.

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

2 years agointel/batch-decoder: Fix uninitialized scalar variables
Vitalii.Lomaka [Wed, 30 Mar 2022 10:41:37 +0000 (13:41 +0300)]
intel/batch-decoder: Fix uninitialized scalar variables

CID: 1498516
CID: 1498560

Signed-off-by: Vitalii Lomaka <vitalii.lomaka@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15685>

2 years agozink: don't emit SpvCapabilityStorageImageMultisample for fbfetch
Mike Blumenkrantz [Fri, 8 Apr 2022 17:06:44 +0000 (13:06 -0400)]
zink: don't emit SpvCapabilityStorageImageMultisample for fbfetch

Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15823>

2 years agozink: handle multisampled fbfetch
Mike Blumenkrantz [Fri, 8 Apr 2022 16:07:26 +0000 (12:07 -0400)]
zink: handle multisampled fbfetch

this uses a shader key to flag the fbfetch as per-sample

it doesn't work, but at least it doesn't error anymore?

Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15823>

2 years agozink: handle SUBPASS_MS in ntv
Mike Blumenkrantz [Fri, 8 Apr 2022 15:06:31 +0000 (11:06 -0400)]
zink: handle SUBPASS_MS in ntv

for completeness but also maybe fbfetch

Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15823>

2 years agointel/dev: Add ATS-M pci-ids
Jordan Justen [Fri, 8 Apr 2022 06:35:06 +0000 (23:35 -0700)]
intel/dev: Add ATS-M pci-ids

Ref: Bspec 44477
Ref: https://patchwork.freedesktop.org/series/101907/
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15814>

2 years agonir_to_tgsi: Fix emitting the sample number for non-array MSAA image access.
Emma Anholt [Tue, 5 Apr 2022 17:05:37 +0000 (10:05 -0700)]
nir_to_tgsi: Fix emitting the sample number for non-array MSAA image access.

It's always in .w, rather than being the next component after the
x/y/array index.

Fixes: c6d3fd8c21e0 ("gallium/ntt: Emit sample index when necessary for image load/store.")

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

2 years agovirgl: Disable nir_op_ffloor to avoid sending DFLR to virglrenderer.
Emma Anholt [Mon, 28 Mar 2022 23:48:31 +0000 (16:48 -0700)]
virgl: Disable nir_op_ffloor to avoid sending DFLR to virglrenderer.

This means that we send ffract+fsub in place of a normal FLR, but
hopefully virglrenderer can be fixed (or doubles support removed).

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

2 years agoradv: introduce new radv_pipeline_stage structure
Samuel Pitoiset [Tue, 5 Apr 2022 11:09:35 +0000 (13:09 +0200)]
radv: introduce new radv_pipeline_stage structure

This is used to store everything for a pipeline stage like the module,
the NIR, the shader arguments etc. This is inspired from ANV.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15794>

2 years agoradv: add missing multi inclusion define to radv_shader_args.h
Samuel Pitoiset [Tue, 5 Apr 2022 12:04:54 +0000 (14:04 +0200)]
radv: add missing multi inclusion define to radv_shader_args.h

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15794>

2 years agoradv: rework pipeline and shaders creation feedback
Samuel Pitoiset [Fri, 8 Apr 2022 06:38:05 +0000 (08:38 +0200)]
radv: rework pipeline and shaders creation feedback

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15794>

2 years agoradv: re-order shader stages directly in radv_create_shaders()
Samuel Pitoiset [Thu, 7 Apr 2022 14:01:10 +0000 (16:01 +0200)]
radv: re-order shader stages directly in radv_create_shaders()

We will have to access pStages::pNext for modules and this will also
allow to rework feedback creation.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15794>

2 years agopvr: Remove logic to set vk_device::alloc.
Rajnesh Kanwal [Mon, 4 Apr 2022 13:01:56 +0000 (14:01 +0100)]
pvr: Remove logic to set vk_device::alloc.

The field is being already set by vk_device_init().

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15768>

2 years agov3dv: fix bogus VkDrmFormatModifierProperties2EXT usage
Iago Toral Quiroga [Fri, 8 Apr 2022 11:48:54 +0000 (13:48 +0200)]
v3dv: fix bogus VkDrmFormatModifierProperties2EXT usage

The array is allocated for VkDrmFormatModifierPropertiesEXT, so
writring entried with type VkDrmFormatModifierProperties2EXT is
bogus.

It seems this was a mistake added with a change intended to get
rid of VK_OUTARRAY_MAKE, that changed the type of the write by
mistake.

Fixes: 56a2ccf05864 ('v3dv: Stop using VK_OUTARRAY_MAKE()')

Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15819>

2 years agoci: Disable Link Power Management with RTL8153
Tomeu Vizoso [Tue, 5 Apr 2022 10:20:11 +0000 (12:20 +0200)]
ci: Disable Link Power Management with RTL8153

There are reliability problems with the RTL8153 ethernet driver under
certain network loads, related to incompatibility of the device with
Link Power Management.

Add usbcore.quirks=0bda:8153:k to the kernel command line to enable the
USB_QUIRK_NO_LPM option.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15791>

2 years agoRevert "ci/freedreno: Disable a618 jobs"
Tomeu Vizoso [Tue, 5 Apr 2022 10:16:27 +0000 (12:16 +0200)]
Revert "ci/freedreno: Disable a618 jobs"

This reverts commit 96e17287b4abe6ac1e0245473ed9ccfe40d0d54a.

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