platform/upstream/mesa.git
2 years agoaco: Fix invalid usage of std::fill with std::array.
Timur Kristóf [Wed, 1 Sep 2021 06:40:45 +0000 (08:40 +0200)]
aco: Fix invalid usage of std::fill with std::array.

In this case std::array doesn't behave like a regular array, therefore
it is NOT okay to index it outside the array, even though std::fill
needs us to do so.

Change the syntax to do the same thing slightly differently,
and add an assertion to make sure the registers are always within
the array's bounds.

Closes: #5289
Fixes: 0e4747d3fb7ec15f8c1d6b971b1352249e7d95c6
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12664>

2 years agoglx: Fix unused-variable warning with macOS build.
Vinson Lee [Sat, 28 Aug 2021 07:02:50 +0000 (00:02 -0700)]
glx: Fix unused-variable warning with macOS build.

../src/glx/tests/indirect_api.cpp:52:20: warning: unused variable 'nil' [-Wunused-variable]
static const void *nil = 0;
                   ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12607>

2 years agonir: Add comment to explain the sad_u8x4 opcode.
Timur Kristóf [Tue, 31 Aug 2021 18:00:16 +0000 (20:00 +0200)]
nir: Add comment to explain the sad_u8x4 opcode.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12649>

2 years agolima/gpir: Rewrite register allocation for value registers
Connor Abbott [Wed, 9 Oct 2019 13:36:56 +0000 (09:36 -0400)]
lima/gpir: Rewrite register allocation for value registers

The usual linear-scan register allocation algorithm can't handle
preallocated registers, since we might be forced to choose a color for
a non-preallocated variable that overlaps with a pre-allocated variable.
But in such cases we can simply split the live range of the offending
variable when we reach the beginning of the pre-allocated variable's
live range. This is still optimal in the sense that it always finds a
coloring whenever one is possible, but we may not insert the smallest
possible number of moves. However, since it's actually the scheduler
which splits live ranges afterwards, we can simply fold in the move
while keeping its fake dependencies, and then everything still works! In
other words, inserting a live range split for a value register during
register allocation is pretty much free.

This means that we can split register allocation in two. First globally
allocate the cross-block registers accessed through load_reg and
store_reg instructions, which is still done via graph coloring, and then
run a linear scan algorithm over each block, treating the load_reg and
store_reg nodes as referring to pre-allocated registers. This makes the
existing RA more complicated, but it has two benefits: first, using
round-robin with the linear scan allocator results in much fewer fake
dependencies, resulting in around 15 less instructions in the glmark2
jellyfish shader and fixing a regression in instruction count since
branching support went in. Second, it will simplify handling spilling.
With just graph coloring for everything, every time we spill a node, we
have to create new value registers which become new nodes in the graph
and re-run RA. This is worsened by the fact that when writing a value to
a temporary, we need to have an extra register available to load the
write address with a load_const node. With the new scheme, we can ignore
this entirely in the first part and then in the second part we can just
reserve an extra register in sections where we know we have to spill. So
no re-running RA many times, and we can get a good result quickly.

The current implementation does linear scan backwards, so that we can
insert the fake dependencies while allocating and avoid creating any
move nodes at all when we have to split a live range. However, it turns
out that this makes handling schedule_first nodes a bit more
complicated, so it's not clear if that was worth it.

Note:
The commit was originally authored by Connor Abbott <cwabbott@gmail.com>
and was cherry-picked from <mesa/mesa!2315>.
Rebasing was necessary due to changes to BITSET_FOREACH_SET,
see 4413537c
Because some deqp tests pass now, deqp-lima-fails.txt was also changed.
The above changes are

Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7682>

2 years agolima: Add a NIR load duplicating pass
Connor Abbott [Mon, 16 Sep 2019 08:37:27 +0000 (15:37 +0700)]
lima: Add a NIR load duplicating pass

and use it with vertex shaders.

Note:
The commit was originally authored by Connor Abbott <cwabbott@gmail.com>
and was cherry-picked from <mesa/mesa!2315>.
Apart from some changes, which were necessary due to rebasing, the following
changes have been added:
clone_intrinsic() was changed to use nir_instr_clone() instead of
doing it manually.
Tests against `src->parent_instr->type != nir_instr_type_phi` have been
inserted, otherwise we may run into a nir validation error.
Intrinsic load_input and load_uniform  are not duplicated, if their source
type is nir_instr_type_load_const.
The above changes are

Signed-off-by: Andreas Baierl <ichgeh@imkreisrum.de>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7682>

2 years agoradeonsi: clean up typecasts in compute_copy_image
Marek Olšák [Wed, 18 Aug 2021 00:40:48 +0000 (20:40 -0400)]
radeonsi: clean up typecasts in compute_copy_image

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

2 years agoradeonsi: enable DCC stores on gfx10.3 APUs for better performance
Marek Olšák [Tue, 17 Aug 2021 23:01:37 +0000 (19:01 -0400)]
radeonsi: enable DCC stores on gfx10.3 APUs for better performance

There is just one hw bug that we need to handle.

NO_DCC_FB was unused.

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

2 years agoradeonsi: track displayable_dcc_dirty for non-compute shaders
Marek Olšák [Tue, 17 Aug 2021 23:58:36 +0000 (19:58 -0400)]
radeonsi: track displayable_dcc_dirty for non-compute shaders

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

2 years agoradeonsi: rename DCC_WRITE -> ALLOW_DCC_STORE
Marek Olšák [Tue, 17 Aug 2021 22:58:20 +0000 (18:58 -0400)]
radeonsi: rename DCC_WRITE -> ALLOW_DCC_STORE

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

2 years agoradeonsi: handle pipe_aligned in compute_expand_fmask
Marek Olšák [Tue, 17 Aug 2021 22:55:16 +0000 (18:55 -0400)]
radeonsi: handle pipe_aligned in compute_expand_fmask

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

2 years agoradeonsi: add missing make_CB_shader_coherent for DCC stores into copy_image
Marek Olšák [Tue, 17 Aug 2021 22:54:16 +0000 (18:54 -0400)]
radeonsi: add missing make_CB_shader_coherent for DCC stores into copy_image

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

2 years agoradeonsi: enable DCC stores for clear_render_target on gfx10
Marek Olšák [Tue, 17 Aug 2021 22:50:15 +0000 (18:50 -0400)]
radeonsi: enable DCC stores for clear_render_target on gfx10

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

2 years agoradeonsi: disable DCC stores on Navi12-14 for displayable DCC to fix corruption
Marek Olšák [Tue, 24 Aug 2021 15:29:31 +0000 (11:29 -0400)]
radeonsi: disable DCC stores on Navi12-14 for displayable DCC to fix corruption

This is a hardware limitation.

Fixes: 1d64a1045ea205ee0 "radeonsi: enable dcc image stores on gfx10+"

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

2 years agozink: remove ZINK_HEAP_HOST_VISIBLE_ANY
Mike Blumenkrantz [Fri, 27 Aug 2021 22:09:25 +0000 (18:09 -0400)]
zink: remove ZINK_HEAP_HOST_VISIBLE_ANY

this was just the coherent heap but splitting the slabs more to make
suballocating worse

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

2 years agozink: clamp lazy pools to 500 descriptors and allocate more slowly
Mike Blumenkrantz [Fri, 16 Jul 2021 17:16:58 +0000 (13:16 -0400)]
zink: clamp lazy pools to 500 descriptors and allocate more slowly

now that these can get popped without stalling, they can be much smaller
to avoid exploding available memory or address space

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

2 years agozink: use compatible renderpass state in pipeline hash
Mike Blumenkrantz [Thu, 17 Jun 2021 19:54:35 +0000 (15:54 -0400)]
zink: use compatible renderpass state in pipeline hash

this massively deduplicates the number of pipelines

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

2 years agozink: track compatible render passes
Mike Blumenkrantz [Thu, 17 Jun 2021 19:51:27 +0000 (15:51 -0400)]
zink: track compatible render passes

Two render passes are compatible if their corresponding color, input, resolve, and depth/stencil
attachment references are compatible and if they are otherwise identical except for:
• Initial and final image layout in attachment descriptions
• Load and store operations in attachment descriptions
• Image layout in attachment references

VK 8.2

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

2 years agozink: inline gfx pipeline hash table
Mike Blumenkrantz [Thu, 17 Jun 2021 18:20:40 +0000 (14:20 -0400)]
zink: inline gfx pipeline hash table

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

2 years agozink: incrementally hash all pipeline component hashes
Mike Blumenkrantz [Thu, 17 Jun 2021 15:46:04 +0000 (11:46 -0400)]
zink: incrementally hash all pipeline component hashes

not the actual pipeline hash, just the components

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

2 years agozink: incrementally hash vertex state into pipeline hash
Mike Blumenkrantz [Thu, 17 Jun 2021 15:32:01 +0000 (11:32 -0400)]
zink: incrementally hash vertex state into pipeline hash

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

2 years agozink: incrementally hash module variants in pipeline
Mike Blumenkrantz [Thu, 17 Jun 2021 15:25:19 +0000 (11:25 -0400)]
zink: incrementally hash module variants in pipeline

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

2 years agozink: incrementally hash gfx shader stages
Mike Blumenkrantz [Thu, 17 Jun 2021 13:45:11 +0000 (09:45 -0400)]
zink: incrementally hash gfx shader stages

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

2 years agozink: don't use dynamic vertex stride with dynamic vertex input
Mike Blumenkrantz [Tue, 17 Aug 2021 14:25:59 +0000 (10:25 -0400)]
zink: don't use dynamic vertex stride with dynamic vertex input

avoid spurious validation errors and potential driver fails from updating
stride twice

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

2 years agozink: dynamic vertex input template
Mike Blumenkrantz [Tue, 15 Jun 2021 18:35:39 +0000 (14:35 -0400)]
zink: dynamic vertex input template

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

2 years agozink: create inner scanout object without scanout binds
Mike Blumenkrantz [Wed, 25 Aug 2021 02:05:23 +0000 (22:05 -0400)]
zink: create inner scanout object without scanout binds

this restores mutable formats to the inner object to work with scanout

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

2 years agozink: ensure gfx shader module states are updated when doing a partial recalc
Mike Blumenkrantz [Tue, 24 Aug 2021 22:33:32 +0000 (18:33 -0400)]
zink: ensure gfx shader module states are updated when doing a partial recalc

these are in the pipeline state and must be updated

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

2 years agozink: remove refcounting from batch states
Mike Blumenkrantz [Wed, 25 Aug 2021 20:08:35 +0000 (16:08 -0400)]
zink: remove refcounting from batch states

these are always destroyed by the context, no exceptions

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

2 years agozink: split out stalling from fence-waiting function
Mike Blumenkrantz [Tue, 31 Aug 2021 20:01:49 +0000 (16:01 -0400)]
zink: split out stalling from fence-waiting function

stall and flush+stall are not the same; in some cases, the driver must only
stall and never flush, so ensure that this is possible to avoid infinite
recursion

fixes Metro Last Light: Redux benchmark mode

Fixes: d8905446d65 ("zink: rework oom flushing")

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

2 years agozink: use tc rebind info for buffer replacements
Mike Blumenkrantz [Fri, 9 Jul 2021 15:12:08 +0000 (11:12 -0400)]
zink: use tc rebind info for buffer replacements

this makes the most common type of replacement more efficient

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

2 years agozink: directly pass resource pointer to descriptor state updates
Mike Blumenkrantz [Mon, 21 Jun 2021 14:42:53 +0000 (10:42 -0400)]
zink: directly pass resource pointer to descriptor state updates

this should cut down a little more overhead

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

2 years agogallium/cso: add unbind mask for cso restore
Mike Blumenkrantz [Mon, 7 Jun 2021 14:20:38 +0000 (10:20 -0400)]
gallium/cso: add unbind mask for cso restore

this code was duplicated in a bunch of places, so now there can just
be a bitmask passed to simplify and consolidate

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

2 years agoaux/cso: always restore states in atom order
Mike Blumenkrantz [Mon, 7 Jun 2021 13:37:59 +0000 (09:37 -0400)]
aux/cso: always restore states in atom order

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

2 years agozink: destroy shader modules on program free to avoid leaking
Mike Blumenkrantz [Tue, 31 Aug 2021 18:21:30 +0000 (14:21 -0400)]
zink: destroy shader modules on program free to avoid leaking

it's irrelevant whether the shader pointer is valid, the shader cache
may still exist

Fixes: a92442225ca ("zink: split up shader cache per-stage")

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12650>

2 years agolavapipe: Use generated command queue code
Tomeu Vizoso [Fri, 13 Aug 2021 08:48:20 +0000 (10:48 +0200)]
lavapipe: Use generated command queue code

Most of the code that implements entry points for commands doesn't need
to be manually written. So just drop it.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369>

2 years agovulkan: Generate entrypoints that enqueue commands
Tomeu Vizoso [Tue, 24 Aug 2021 09:14:33 +0000 (11:14 +0200)]
vulkan: Generate entrypoints that enqueue commands

For drivers such as Lavapipe that record the commands at the execution
stage.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369>

2 years agovulkan: Generate code to place commands in a queue
Tomeu Vizoso [Wed, 11 Aug 2021 08:01:14 +0000 (10:01 +0200)]
vulkan: Generate code to place commands in a queue

It can be used by lavapipe and also by drivers for GPUs with command
streams that require values related to the framebuffer, thus the command
stream emission for secondary buffers needs to be deferred until the
framebuffer is known (execution time).

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369>

2 years agovulkan: Read len attribute of parameters to functions
Tomeu Vizoso [Wed, 11 Aug 2021 07:58:08 +0000 (09:58 +0200)]
vulkan: Read len attribute of parameters to functions

It will be needed for generating code that needs to know the size of
arrays.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369>

2 years agolavapipe: add xfails for whole of CTS
Tomeu Vizoso [Wed, 25 Aug 2021 07:01:08 +0000 (09:01 +0200)]
lavapipe: add xfails for whole of CTS

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12369>

2 years agoac/gpu_info: fix detection of smart access memory
Marek Olšák [Tue, 31 Aug 2021 09:50:54 +0000 (05:50 -0400)]
ac/gpu_info: fix detection of smart access memory

chip_class was 0. Move the code after setting chip_class.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5282

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

2 years agoradeonsi: set gfx10 registers better in si_emit_initial_compute_regs
Marek Olšák [Mon, 30 Aug 2021 05:28:52 +0000 (01:28 -0400)]
radeonsi: set gfx10 registers better in si_emit_initial_compute_regs

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

2 years agoradeonsi: fix a memory leak in si_get_shader_binary_size
Marek Olšák [Tue, 24 Aug 2021 15:49:30 +0000 (11:49 -0400)]
radeonsi: fix a memory leak in si_get_shader_binary_size

Fixes: bf8a1ca9024 "radeonsi: use the new run-time linker for shaders"
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5272

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

2 years agoac/debug: add an option to disable colors for printed IBs
Marek Olšák [Sun, 22 Aug 2021 00:51:05 +0000 (20:51 -0400)]
ac/debug: add an option to disable colors for printed IBs

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

2 years agoradeonsi: add si_print_current_ib function for debugging
Marek Olšák [Fri, 20 Aug 2021 16:50:31 +0000 (12:50 -0400)]
radeonsi: add si_print_current_ib function for debugging

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

2 years agoradeonsi: don't use SQ_NON_EVENT before GE_PC_ALLOC for better perf on Navi1x
Marek Olšák [Wed, 18 Aug 2021 19:21:28 +0000 (15:21 -0400)]
radeonsi: don't use SQ_NON_EVENT before GE_PC_ALLOC for better perf on Navi1x

SQ_NON_EVENT was originally meant to fix a perf issue on Navi1x, but using
the event actually makes the perf worse.

This improves perf for viewperf/snx.

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

2 years agoradeonsi: inline si_need_gfx_cs_space
Marek Olšák [Fri, 13 Aug 2021 13:36:30 +0000 (09:36 -0400)]
radeonsi: inline si_need_gfx_cs_space

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

2 years agowinsys/amdgpu: clean up amdgpu_cs_check_space
Marek Olšák [Wed, 11 Aug 2021 16:22:46 +0000 (12:22 -0400)]
winsys/amdgpu: clean up amdgpu_cs_check_space

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

2 years agoradeonsi: simplify si_need_gfx_cs_space
Marek Olšák [Wed, 11 Aug 2021 16:10:28 +0000 (12:10 -0400)]
radeonsi: simplify si_need_gfx_cs_space

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

2 years agoradeonsi: inline remaining big functions in draw_vbo for better snx perf
Marek Olšák [Wed, 11 Aug 2021 08:42:04 +0000 (04:42 -0400)]
radeonsi: inline remaining big functions in draw_vbo for better snx perf

This makes compilation slower, but the perf improvement is ~4%
with pipe_vertex_state.

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

2 years agoradeonsi: simplify memory usage checking by merging vram and gtt counters
Marek Olšák [Wed, 11 Aug 2021 08:50:53 +0000 (04:50 -0400)]
radeonsi: simplify memory usage checking by merging vram and gtt counters

no change in behavior

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

2 years agoradeonsi: correctly use cs instead of gfx_cs in build pm4 helpers
Marek Olšák [Wed, 11 Aug 2021 06:49:33 +0000 (02:49 -0400)]
radeonsi: correctly use cs instead of gfx_cs in build pm4 helpers

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

2 years agoradeonsi: use memcmp and radeon_emit_array in radeon_opt_set_context_regn
Marek Olšák [Wed, 11 Aug 2021 06:46:25 +0000 (02:46 -0400)]
radeonsi: use memcmp and radeon_emit_array in radeon_opt_set_context_regn

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

2 years agoradeonsi: stop using AC_EXP_PARAM_UNDEFINED because it's not useful
Marek Olšák [Wed, 11 Aug 2021 04:37:12 +0000 (00:37 -0400)]
radeonsi: stop using AC_EXP_PARAM_UNDEFINED because it's not useful

Just use AC_EXP_PARAM_DEFAULT_VAL_0000 to keep things simple.

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

2 years agoradeonsi: inline si_get_alpha_test_func
Marek Olšák [Tue, 10 Aug 2021 05:33:21 +0000 (01:33 -0400)]
radeonsi: inline si_get_alpha_test_func

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

2 years agoradeonsi: move as_ls/es/ngg setting out of si_shader_selector_key
Marek Olšák [Tue, 10 Aug 2021 04:55:52 +0000 (00:55 -0400)]
radeonsi: move as_ls/es/ngg setting out of si_shader_selector_key

Do it when we bind shaders.

The advantages are:
- no need to memset the fields when any shader variant state is changed
  (e.g. culling on/off)
- no need to recompute the fields every time that happens

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

2 years agoradeonsi: move si_vgt_stages_key determination into si_update_vgt_shader_config
Marek Olšák [Tue, 10 Aug 2021 04:15:41 +0000 (00:15 -0400)]
radeonsi: move si_vgt_stages_key determination into si_update_vgt_shader_config

This simplifies si_update_shaders. It also makes it more obvious that
si_update_shaders could become a C++ template one day.

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

2 years agoradeonsi: remove stages_key parameter from si_shader_selector_key
Marek Olšák [Tue, 10 Aug 2021 04:03:40 +0000 (00:03 -0400)]
radeonsi: remove stages_key parameter from si_shader_selector_key

no change in behavior

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

2 years agoradeonsi: remove instancing support from the prim discard compute shader
Marek Olšák [Tue, 10 Aug 2021 08:09:02 +0000 (04:09 -0400)]
radeonsi: remove instancing support from the prim discard compute shader

It's not important for workstation apps on Vega.

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

2 years agoradeonsi: remove unused depth_clamp_any
Marek Olšák [Tue, 10 Aug 2021 07:55:18 +0000 (03:55 -0400)]
radeonsi: remove unused depth_clamp_any

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

2 years agomesa: skip draw calls with unaligned indices
Marek Olšák [Tue, 24 Aug 2021 16:59:14 +0000 (12:59 -0400)]
mesa: skip draw calls with unaligned indices

GL doesn't say which error we should report. dEQP expects no error and
no crash and allows skipping the call. Some drivers can crash.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5227
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12533>

2 years agomesa: fix gl_DrawID with indirect multi draws using user indirect buffer
Marek Olšák [Tue, 24 Aug 2021 17:03:30 +0000 (13:03 -0400)]
mesa: fix gl_DrawID with indirect multi draws using user indirect buffer

The code lowered the draws to direct ones but disregarded gl_DrawID.
We need to pass the draw ID to the driver manually.

gl_DrawID is the 3rd parameter of DrawGallium here.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5274
Cc: mesa-stable@lists.freedesktop.org
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12533>

2 years agomesa: remove unused indices parameter from validate functions
Marek Olšák [Wed, 25 Aug 2021 00:07:08 +0000 (20:07 -0400)]
mesa: remove unused indices parameter from validate functions

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

2 years agolavapipe: VK_KHR_depth_stencil_resolve support
Dave Airlie [Thu, 24 Dec 2020 04:09:58 +0000 (14:09 +1000)]
lavapipe: VK_KHR_depth_stencil_resolve support

This adds support for depth stencil resolves to lavapipe.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agou_blitter: add support for sample0 only resolves.
Dave Airlie [Mon, 23 Aug 2021 07:26:29 +0000 (17:26 +1000)]
u_blitter: add support for sample0 only resolves.

This adds support for sample0 only resolves to support lavapipe

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agogallium: add a sample0 only option to blitter.
Dave Airlie [Mon, 23 Aug 2021 07:25:13 +0000 (17:25 +1000)]
gallium: add a sample0 only option to blitter.

Vulkan depth/stencil resolves can ask for just sample 0 instead
of averaging. Just add a flag to the state to allow it.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agollvmpipe: adjust scissor planes for multisample.
Dave Airlie [Mon, 30 Aug 2021 04:44:47 +0000 (14:44 +1000)]
llvmpipe: adjust scissor planes for multisample.

For the inclusive x0/y0 planes, add a half pixel adjustment

For the exclusive x1/y1 planes, remove a half pixel adjustment

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agollvmpipe/scissor: rewrite scissor planes interaction.
Dave Airlie [Mon, 30 Aug 2021 03:56:03 +0000 (13:56 +1000)]
llvmpipe/scissor: rewrite scissor planes interaction.

This just changes the calcs to be cleaner and easier to interpret.

Adjust the inclusive (x0/y0) by -1 like before, and then flip the
sign for the correct direction.

Add full pixel to the exclusive side after scaling, this is do
show that this value is incorrect and the next patch fixes that
taking multisample into account

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agollvmpipe: consolidate scissor plane code between line/tri
Dave Airlie [Mon, 30 Aug 2021 03:52:29 +0000 (13:52 +1000)]
llvmpipe: consolidate scissor plane code between line/tri

This code is pretty much the same in both, consolidate it.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agollvmpipe/fs: fix multisample depth/stencil fs writes.
Dave Airlie [Mon, 23 Aug 2021 07:15:17 +0000 (17:15 +1000)]
llvmpipe/fs: fix multisample depth/stencil fs writes.

The state wasn't storing the shader depth/stencil outputs
per-sample, so only the last sample emitted was being used
for the late depth test and stencil ref.

Noticed while trying to fix some vulkan depth stencil resolve
issues

Fixes: a0195240c44f ("llvmpipe: handle multisample early depth test/late depth write")

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12504>

2 years agovbo: check more GL errors when drawing via glCallList
Marek Olšák [Sun, 8 Aug 2021 06:18:35 +0000 (02:18 -0400)]
vbo: check more GL errors when drawing via glCallList

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

2 years agovbo: merge draws with GL_LINES regardless of line stippling
Marek Olšák [Thu, 17 Jun 2021 00:07:48 +0000 (20:07 -0400)]
vbo: merge draws with GL_LINES regardless of line stippling

see the code comment

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

2 years agoutil/cpu_detect: add/guess support for next Zen CPUs
Marek Olšák [Tue, 10 Aug 2021 16:09:57 +0000 (12:09 -0400)]
util/cpu_detect: add/guess support for next Zen CPUs

so that we don't have to update this anymore

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

2 years agoutil/cpu_detect: print num_L3_caches and num_cpu_mask_bits
Marek Olšák [Mon, 14 Jun 2021 20:33:01 +0000 (16:33 -0400)]
util/cpu_detect: print num_L3_caches and num_cpu_mask_bits

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

2 years agomain: allow all external textures for BindImageTexture
Quantum [Sun, 15 Aug 2021 21:44:04 +0000 (17:44 -0400)]
main: allow all external textures for BindImageTexture

According to OES_EGL_image_external_essl3:

  On p. 196 in the errors section for BindImageTexture, replace the
  last error with the following:

    "An INVALID_OPERATION error is generated if <texture> is neither the
     name of an immutable texture object, nor the name of an external
     texture object."

According to OES_EGL_image_external:

  The command

    void EGLImageTargetTexture2DOES(enum target, eglImageOES image);

  with <target> set to TEXTURE_EXTERNAL_OES defines the currently bound
  external texture object to be a target sibling of <image>.

  ...

  If <target> is not TEXTURE_EXTERNAL_OES, the error INVALID_ENUM is
  generated.  (Note: if GL_OES_EGL_image is supported then <target> may
  also be TEXTURE_2D).

Currently, mesa only allows GL_TEXTURE_EXTERNAL_OES textures to be bound
by glBindImageTexture. However, the language of the specification does not
appear to use "external" to refer to GL_TEXTURE_EXTERNAL_OES specifically,
since OES_EGL_image_external allows external eglImageOES to be attached
to GL_TEXTURE_2D in the presence of GL_OES_EGL_image. Thus, it should be
interpreted to refer to all types of external textures, including 2D
textures attached via glEGLImageTargetTexture2DOES.

Fixes: ed43dd62acc ("main: allow external textures for BindImageTexture")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12383>

2 years agovenus: set maxMipLevels to 1 for ahb images
Yiwei Zhang [Tue, 31 Aug 2021 20:04:41 +0000 (20:04 +0000)]
venus: set maxMipLevels to 1 for ahb images

Fixes: dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.*

Cc: 21.2.2 mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12639>

2 years agoiris: Map scanout buffers WC instead of WB [v2]
Keith Packard [Fri, 6 Aug 2021 23:11:18 +0000 (16:11 -0700)]
iris: Map scanout buffers WC instead of WB [v2]

The scanout engine is not coherent with rendering, so make sure
scanout buffers are mapped WC. This ensures that CPU rendering as done
by the Xserver gets flushed to the frame buffer immediately instead of
waiting for some future time.

v2:
    Also mark shared buffers to be allocated for scanout
    in case they are being used for scanout elsewhere.

Signed-off-by: Keith Packard <keithp@keithp.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5231
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12259>

2 years agovenus: fix device group enumeration with unsupported devices
Chia-I Wu [Sun, 29 Aug 2021 04:42:32 +0000 (21:42 -0700)]
venus: fix device group enumeration with unsupported devices

instance->physical_devices includes only supported devices, not all
devices.  One example is that it does not include 1.0 devices.  We need
to fix up VkPhysicalDeviceGroupProperties to exclude unsupported
devices.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12637>

2 years agovenus: pre-initialize device groups
Chia-I Wu [Sun, 29 Aug 2021 03:40:33 +0000 (20:40 -0700)]
venus: pre-initialize device groups

We don't need to worry about how vkEnumeratePhysicalDeviceGroups is
called (props is NULL, props is non-NULL but count is 0, etc.) this way.
It also allows us to fix up VkPhysicalDeviceGroupProperties easily.

v2: let the for-loop increment (Yiwei)

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12637>

2 years agovenus: minor cleanup to physical device init loop
Chia-I Wu [Sun, 29 Aug 2021 03:28:31 +0000 (20:28 -0700)]
venus: minor cleanup to physical device init loop

v2: let the for-loop increment (Yiwei)

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> (v1)
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12637>

2 years agoir3/ra: Fix type mismatch when comparing intervals
Connor Abbott [Fri, 20 Aug 2021 14:33:55 +0000 (16:33 +0200)]
ir3/ra: Fix type mismatch when comparing intervals

This was once a physreg, back in the very beginning of the new RA, but
now the caller passes an unsigned int.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5163
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12487>

2 years agoir3: Make ir3_register::name 32-bits
Connor Abbott [Fri, 20 Aug 2021 14:33:03 +0000 (16:33 +0200)]
ir3: Make ir3_register::name 32-bits

It was overflowing with
dEQP-VK.spirv_assembly.instruction.compute.spirv_ids_abuse.lots_ids.

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

2 years agoir3: Make instruction IP 32 bits
Connor Abbott [Fri, 20 Aug 2021 14:30:30 +0000 (16:30 +0200)]
ir3: Make instruction IP 32 bits

a6xx supports shaders with more than 64k dwords, or at least the shader
size register has increased in size, and the matching name is gone so
there's no reason to be clever here. This doesn't fix anything at the
moment.

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

2 years agoir3: Remove ir3_instr::name
Connor Abbott [Fri, 20 Aug 2021 14:28:19 +0000 (16:28 +0200)]
ir3: Remove ir3_instr::name

Unused since the switch to new RA.

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

2 years agonir_to_tgsi: Use explicit sizes of NIR variables for UBO declarations.
Emma Anholt [Mon, 2 Aug 2021 17:43:02 +0000 (10:43 -0700)]
nir_to_tgsi: Use explicit sizes of NIR variables for UBO declarations.

This fixes duplicate CB0 declarations, missing interface array
declarations, and too-low sizes of UBOs containing multiple nir_variables.

Closes: #4810
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12175>

2 years agonir/nir_lower_uniforms_to_ubo: Set the explicit stride of the UBO 0 uniform.
Emma Anholt [Mon, 2 Aug 2021 17:47:54 +0000 (10:47 -0700)]
nir/nir_lower_uniforms_to_ubo: Set the explicit stride of the UBO 0 uniform.

Normal UBOs have explicit strides on them, make our lowered one behave the
same.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12175>

2 years agonir: Set .driver_location for GLSL UBO/SSBOs when we lower to block indices.
Emma Anholt [Mon, 2 Aug 2021 19:49:56 +0000 (12:49 -0700)]
nir: Set .driver_location for GLSL UBO/SSBOs when we lower to block indices.

Without this, there's no way to match the UBO nir_variable declarations to
the load_ubo intrinsics referencing their data.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12175>

2 years agoanv: Enable KHR_shader_integer_dot_product
Ian Romanick [Tue, 15 Jun 2021 02:49:32 +0000 (19:49 -0700)]
anv: Enable KHR_shader_integer_dot_product

For now, only mark the 4x8BitPacked variants as accelerated.

Applications are unlikely to use the "add with saturate" opcodes from
VK_INTEL_shader_integer_functions2, so, technically, all of the
AccumulatingSaturating variants "[provide] a performance advantage over
user-provided code composed from elementary instructions..." on all
Intel platforms.  If we encounter an application that cares, we can do
things differently then.  Ditto for the non-packed 8Bit, 4-element
vector variants.

v2: Don't memset props as this also zeros sType and pNext.  Noticed by
Georg Lehmann in !12617.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12624>

2 years agozink: ci updates
Mike Blumenkrantz [Tue, 31 Aug 2021 18:24:32 +0000 (14:24 -0400)]
zink: ci updates

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

2 years agodocs: mark off ES 3.2 for zink
Mike Blumenkrantz [Tue, 31 Aug 2021 15:44:28 +0000 (11:44 -0400)]
docs: mark off ES 3.2 for zink

blammo

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

2 years agozink: enable fbfetch pipe cap
Mike Blumenkrantz [Tue, 27 Jul 2021 18:04:35 +0000 (14:04 -0400)]
zink: enable fbfetch pipe cap

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

2 years agozink: add a renderpass flag for input attachment layout handling
Mike Blumenkrantz [Tue, 27 Jul 2021 18:04:14 +0000 (14:04 -0400)]
zink: add a renderpass flag for input attachment layout handling

this has special requirements

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

2 years agozink: update push descriptor set anytime fbfetch changes
Mike Blumenkrantz [Tue, 27 Jul 2021 18:03:50 +0000 (14:03 -0400)]
zink: update push descriptor set anytime fbfetch changes

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

2 years agozink: add an input attachment to the gfx push set layout to handle fbfetch
Mike Blumenkrantz [Tue, 27 Jul 2021 18:03:23 +0000 (14:03 -0400)]
zink: add an input attachment to the gfx push set layout to handle fbfetch

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

2 years agozink: fix lazy descriptor deinit
Mike Blumenkrantz [Tue, 27 Jul 2021 18:18:46 +0000 (14:18 -0400)]
zink: fix lazy descriptor deinit

this used to be the right conditional, but it's not anymore

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

2 years agozink: add an input attachment to the gfx push set layout to handle fbfetch
Mike Blumenkrantz [Tue, 27 Jul 2021 18:03:23 +0000 (14:03 -0400)]
zink: add an input attachment to the gfx push set layout to handle fbfetch

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

2 years agozink: flag color attachment images as input attachments at creation
Mike Blumenkrantz [Tue, 27 Jul 2021 18:02:32 +0000 (14:02 -0400)]
zink: flag color attachment images as input attachments at creation

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

2 years agozink: track fbfetch info on context, update as needed
Mike Blumenkrantz [Tue, 27 Jul 2021 17:59:39 +0000 (13:59 -0400)]
zink: track fbfetch info on context, update as needed

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

2 years agozink: refactor descriptor layout/template creation a little
Mike Blumenkrantz [Tue, 27 Jul 2021 17:56:07 +0000 (13:56 -0400)]
zink: refactor descriptor layout/template creation a little

make the push sets more flexible

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

2 years agozink: add a compiler pass to translate fbfetch -> input attachments
Mike Blumenkrantz [Tue, 27 Jul 2021 17:49:25 +0000 (13:49 -0400)]
zink: add a compiler pass to translate fbfetch -> input attachments

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

2 years agozink: emit fbfetch variables as ntv input attachments
Mike Blumenkrantz [Tue, 27 Jul 2021 17:44:32 +0000 (13:44 -0400)]
zink: emit fbfetch variables as ntv input attachments

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

2 years agozink: add input attachment thingy for spirv builder
Mike Blumenkrantz [Fri, 9 Jul 2021 12:57:19 +0000 (08:57 -0400)]
zink: add input attachment thingy for spirv builder

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