platform/upstream/mesa.git
2 years agoradv: Fix loading task shader ring buffer addresses.
Timur Kristóf [Fri, 13 May 2022 14:13:54 +0000 (16:13 +0200)]
radv: Fix loading task shader ring buffer addresses.

I forgot to use task_ring_offsets instead of ring_offsets
when I ported this code to the new ABI.

Fixes: a8bdcf3c92b12bb551e11bebaf23fa7802f01075
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16500>

2 years agoradv: Fix task shader info.
Timur Kristóf [Fri, 13 May 2022 14:12:46 +0000 (16:12 +0200)]
radv: Fix task shader info.

This is in the wrong place thanks to a rebase mistake.

Fixes: 101a7321c4002eec9019f2e25d40d931f74e90b9
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16500>

2 years agoradeonsi/gfx11: set BIG_PAGE for the attribute ring
Marek Olšák [Sun, 15 May 2022 05:43:01 +0000 (01:43 -0400)]
radeonsi/gfx11: set BIG_PAGE for the attribute ring

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

2 years agoradeonsi: print an error when failing to create a context
Marek Olšák [Wed, 11 May 2022 22:36:29 +0000 (18:36 -0400)]
radeonsi: print an error when failing to create a context

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

2 years agoradeonsi: fix a crash when failing to create a context
Marek Olšák [Wed, 11 May 2022 22:22:46 +0000 (18:22 -0400)]
radeonsi: fix a crash when failing to create a context

When shader_query_buffers is NULL, the code treated as as non-empty.

Fixes: 792a638b032d "radeonsi/gfx10: implement streamout-related queries"

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

2 years agoradeonsi: use AMDGPU_VM_PAGE_NOALLOC to disable MALL (infinity cache)
Marek Olšák [Tue, 10 May 2022 21:22:15 +0000 (17:22 -0400)]
radeonsi: use AMDGPU_VM_PAGE_NOALLOC to disable MALL (infinity cache)

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

2 years agoradeonsi: use the new flag AMDGPU_GEM_CREATE_DISCARDABLE
Marek Olšák [Tue, 10 May 2022 20:57:08 +0000 (16:57 -0400)]
radeonsi: use the new flag AMDGPU_GEM_CREATE_DISCARDABLE

It forces the best placement (usually VRAM) and evictions discard the contents
instead of copying.

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

2 years agoinclude: update amdgpu_drm.h
Marek Olšák [Tue, 10 May 2022 20:41:04 +0000 (16:41 -0400)]
include: update amdgpu_drm.h

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

2 years agowinsys/amdgpu-radeon: clean up code related to heaps
Marek Olšák [Wed, 11 May 2022 04:06:27 +0000 (00:06 -0400)]
winsys/amdgpu-radeon: clean up code related to heaps

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

2 years agoradeonsi: use PIPE_RESOURCE_FLAG_UNMAPPABLE and DRIVER_INTERNAL more
Marek Olšák [Tue, 10 May 2022 20:36:00 +0000 (16:36 -0400)]
radeonsi: use PIPE_RESOURCE_FLAG_UNMAPPABLE and DRIVER_INTERNAL more

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

2 years agowinsys/amdgpu: handle RADEON_FLAG_ENCRYPTED as a heap modifier
Marek Olšák [Wed, 11 May 2022 03:52:15 +0000 (23:52 -0400)]
winsys/amdgpu: handle RADEON_FLAG_ENCRYPTED as a heap modifier

so that we don't need custom code for encrypted allocations

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

2 years agowinsys/amdgpu-radeon: rework how we describe heaps
Marek Olšák [Wed, 11 May 2022 03:29:20 +0000 (23:29 -0400)]
winsys/amdgpu-radeon: rework how we describe heaps

It was getting difficult to add more heaps.

This adds more heaps because more flag combinations are legal now.
Invalid flag combinations are also handled better.

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

2 years agoradeonsi: rename RADEON_FLAG_UNCACHED -> RADEON_FLAG_GL2_BYPASS
Marek Olšák [Tue, 10 May 2022 21:00:07 +0000 (17:00 -0400)]
radeonsi: rename RADEON_FLAG_UNCACHED -> RADEON_FLAG_GL2_BYPASS

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

2 years agoradv/ci: re-enable fossils testing
Martin Roukala (né Peres) [Wed, 11 May 2022 13:19:01 +0000 (16:19 +0300)]
radv/ci: re-enable fossils testing

It has been disabled in December 2021 due to unreliability,
and never got re-enabled.

VEGA10 is disabled because it currently fails:

    Replay of parallel-rdp/uber_subgroup.foz failed
    Fossilize ERROR: Compute pipeline crashed or hung, hash: 520406f40241abf8. Rerun with: --compute-pipeline-range 4 5.

Suggested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16455>

2 years agoaco: do not emit the primitive ID twice for NGG VS or TES with GS
Samuel Pitoiset [Fri, 13 May 2022 13:18:41 +0000 (15:18 +0200)]
aco: do not emit the primitive ID twice for NGG VS or TES with GS

The primitive ID is required to be exported by the GS stage, so this
should only be needed for NGG VS or TES without a GS stage. Otherwise,
it's exported twice.

No fossils-db changes.

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

2 years agodzn: Fix dzn_cmd_buffer_collect_queries()
Boris Brezillon [Tue, 26 Apr 2022 08:09:18 +0000 (01:09 -0700)]
dzn: Fix dzn_cmd_buffer_collect_queries()

We can have an empty dzn_cmd_buffer_query_pool_state::collect
bitset, handle that case properly.

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

2 years agoradv: do not declare the scratch offset on GFX11
Samuel Pitoiset [Thu, 12 May 2022 15:38:18 +0000 (17:38 +0200)]
radv: do not declare the scratch offset on GFX11

It no longer exists.

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

2 years agodzn: reset correct list
Erik Faye-Lund [Sun, 15 May 2022 09:46:05 +0000 (11:46 +0200)]
dzn: reset correct list

It makes no sense to add the active heaps to the free heaps, just to
remove them again. Instead, let's move them from the one list to the
other.

This fixes a crash in Doom 2016 after a while, due to resource
exhaustion.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16514>

2 years agoci: uprev piglit 2022-05-10
David Heidelberg [Thu, 5 May 2022 16:50:50 +0000 (18:50 +0200)]
ci: uprev piglit 2022-05-10

Also document additional piglit failures and crashes with new tests.

Multiple changes, mostly notable:
 - few new tests
 - traces downloader improvements

Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16428>

2 years agoetnaviv: don't halve max_instructions for GC400
Kyle Russell [Sat, 7 May 2022 21:56:09 +0000 (17:56 -0400)]
etnaviv: don't halve max_instructions for GC400

This allows glamor to successfully compile its shaders on the GC400.

When running glamor using the GC400, Xorg reports that the compiled
shaders exceed the maximum allowed instructions because the value
reported from the kernel is halved.

Xserver[314]: etna_draw_vbo:318: compiled shaders are not okay

$ cat /sys/kernel/debug/dri/128/gpu | grep instruction_count
         instruction_count: 256

However, the spec for the Unified vertex-fragment shader explicitly
lists 256 as the maximum number of instructions for each shader
("256 for vertex shaders; 256 for fragment shaders").

Signed-off-by: Kyle Russell <bkylerussell@gmail.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16383>

2 years agoglsl: remove now unused GLSL IR varying linker code
Timothy Arceri [Fri, 6 May 2022 00:48:33 +0000 (10:48 +1000)]
glsl: remove now unused GLSL IR varying linker code

Acked-by: Emma Anholt <emma@anholt.net>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15731>

2 years agoglsl: enable the use of the nir based varying linker
Timothy Arceri [Tue, 23 Nov 2021 01:44:07 +0000 (12:44 +1100)]
glsl: enable the use of the nir based varying linker

Here as well as calling the pass we need to switch the order of
some of the information gathering and optimisation calls. We also
need to create a custom callback for the dead variables removal
pass to clean up dead builtin varying in SSO programs without
causing piglit regressions.

shader-db results IRIS (BDW):

total instructions in shared programs: 17487900 -> 17477072 (-0.06%)
instructions in affected programs: 128682 -> 117854 (-8.41%)
helped: 587
HURT: 82
helped stats (abs) min: 1 max: 145 x̄: 18.82 x̃: 20
helped stats (rel) min: 0.21% max: 77.78% x̄: 17.41% x̃: 8.85%
HURT stats (abs)   min: 1 max: 6 x̄: 2.68 x̃: 2
HURT stats (rel)   min: 0.25% max: 9.76% x̄: 2.94% x̃: 2.16%
95% mean confidence interval for instructions value: -17.71 -14.66
95% mean confidence interval for instructions %-change: -16.40% -13.42%
Instructions are helped.

total cycles in shared programs: 857442520 -> 857170199 (-0.03%)
cycles in affected programs: 112252720 -> 111980399 (-0.24%)
helped: 13733
HURT: 13349
helped stats (abs) min: 1 max: 7293 x̄: 81.44 x̃: 10
helped stats (rel) min: <.01% max: 90.32% x̄: 3.30% x̃: 0.62%
HURT stats (abs)   min: 1 max: 7424 x̄: 63.38 x̃: 8
HURT stats (rel)   min: <.01% max: 192.23% x̄: 3.28% x̃: 0.54%
95% mean confidence interval for cycles value: -14.01 -6.10
95% mean confidence interval for cycles %-change: -0.17% 0.06%
Inconclusive result (%-change mean confidence interval includes 0).

total sends in shared programs: 971443 -> 970010 (-0.15%)
sends in affected programs: 4596 -> 3163 (-31.18%)
helped: 446
HURT: 39
helped stats (abs) min: 1 max: 6 x̄: 3.40 x̃: 4
helped stats (rel) min: 3.03% max: 85.71% x̄: 46.48% x̃: 50.00%
HURT stats (abs)   min: 1 max: 3 x̄: 2.15 x̃: 2
HURT stats (rel)   min: 6.67% max: 25.00% x̄: 15.16% x̃: 10.53%
95% mean confidence interval for sends value: -3.13 -2.78
95% mean confidence interval for sends %-change: -44.16% -38.88%
Sends are helped.

LOST:   235
GAINED: 262

Shader-db results radeonsi (RX580):

169505 shaders in 102144 tests
Totals:
SGPRS: 7698832 -> 7696552 (-0.03 %)
VGPRS: 5547296 -> 5545280 (-0.04 %)
Spilled SGPRs: 14795 -> 14773 (-0.15 %)
Spilled VGPRs: 3782 -> 3782 (0.00 %)
Private memory VGPRs: 1152 -> 1152 (0.00 %)
Scratch size: 3872 -> 3872 (0.00 %) dwords per thread
Code Size: 162946528 -> 162895264 (-0.03 %) bytes
Max Waves: 2449334 -> 2449736 (0.02 %)

Totals from affected shaders:
SGPRS: 215024 -> 212744 (-1.06 %)
VGPRS: 151976 -> 149960 (-1.33 %)
Spilled SGPRs: 162 -> 140 (-13.58 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 5249916 -> 5198652 (-0.98 %) bytes
Max Waves: 54588 -> 54990 (0.74 %)

Panfrost trace checksum is updated as per discussion in:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/6343

Some virpipe tess shader piglit tests are added as failures to CI
these failures are not a regression but an uncovered existing bug
exposed due to the linker no longer sorting internally facing
shader interfaces in alphabetical order. See details in:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/6481

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

2 years agoglsl: implement lower_xfb_varying() as a NIR pass
Timothy Arceri [Mon, 4 Apr 2022 07:51:21 +0000 (17:51 +1000)]
glsl: implement lower_xfb_varying() as a NIR pass

This just converts the GLSL IR pass to NIR.

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

2 years agoglsl: implement opt_dead_builtin_varyings() as a NIR pass
Timothy Arceri [Fri, 1 Apr 2022 04:24:48 +0000 (15:24 +1100)]
glsl: implement opt_dead_builtin_varyings() as a NIR pass

And also call it via the NIR varying linker.

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

2 years agoglsl: add a NIR based varying linker
Timothy Arceri [Tue, 2 Nov 2021 01:43:54 +0000 (12:43 +1100)]
glsl: add a NIR based varying linker

With a NIR based linker we get better xfb packing, and we no longer
depend on the GLSL IR optimisations to be able to link shaders
with a large amount of dead input/outputs.

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

2 years agoglsl: implement lower_packed_varyings() as a NIR pass
Timothy Arceri [Tue, 23 Nov 2021 01:43:18 +0000 (12:43 +1100)]
glsl: implement lower_packed_varyings() as a NIR pass

This is essentially the old GLSL IR packing pass rewritten as a
NIR based pass.

Doing this packing in NIR after we have preformed NIRs
optimisation passes can give us better packing results.

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

2 years agonir: skip lowering io to scalar for must_be_shader_input
Timothy Arceri [Wed, 23 Mar 2022 04:24:10 +0000 (15:24 +1100)]
nir: skip lowering io to scalar for must_be_shader_input

These varyings cannot be packed by the GLSL linkers packing pass
so we need to skip this lowering until later when we can properly
handle them.

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

2 years agonir: abort io info gathering if location is not set or is a temp value
Timothy Arceri [Wed, 16 Mar 2022 05:58:02 +0000 (16:58 +1100)]
nir: abort io info gathering if location is not set or is a temp value

Unlike spirv glsl varyings might not have explicit locations set.
nir_shader_gather_info() was once only called at the end of linking
but these days it even gets called in NIR optimisation loops via
nir_opt_phi_precision.

In the following patches we implement a NIR version of the GLSL
varying linker which means we will have varyings with no location
set when nir_shader_gather_info() gets called the first few times,
and temp values set only for the purpose of removing unmatched
varyings between shaders for some calls after that.

Here rather than asserting we simply abort the io info gathering,
when we hit these values.

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

2 years agonir: add variable data fields required for NIR glsl varying linking
Timothy Arceri [Tue, 2 Nov 2021 01:46:06 +0000 (12:46 +1100)]
nir: add variable data fields required for NIR glsl varying linking

These will be used in the following patches that add a NIR based
varying linker.

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

2 years agoglsl: add new build program resource helpers
Timothy Arceri [Mon, 21 Mar 2022 06:41:58 +0000 (17:41 +1100)]
glsl: add new build program resource helpers

These will be used by a new nir based glsl varying linker that will
add varyings directly to the list before the are packed and we lose
the information.

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

2 years agoglsl/mesa: move parse_program_resource_name() to common linker_util code
Timothy Arceri [Tue, 1 Feb 2022 01:57:56 +0000 (12:57 +1100)]
glsl/mesa: move parse_program_resource_name() to common linker_util code

This will be shared by a new NIR varying linking pass in following patches
but probably fits better here anyway considering its also used by
shader_query.cpp

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

2 years agonir/glsl: wrap component_slots_aligned()
Timothy Arceri [Tue, 2 Nov 2021 01:33:10 +0000 (12:33 +1100)]
nir/glsl: wrap component_slots_aligned()

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

2 years agonir/glsl: wrapper field_index()
Timothy Arceri [Mon, 1 Nov 2021 04:16:18 +0000 (15:16 +1100)]
nir/glsl: wrapper field_index()

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

2 years agonir/glsl: wrapper contains_{double,interger}()
Timothy Arceri [Mon, 1 Nov 2021 03:48:38 +0000 (14:48 +1100)]
nir/glsl: wrapper contains_{double,interger}()

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

2 years agonir/glsl: add glsl_record_compare() wrapper
Timothy Arceri [Mon, 1 Nov 2021 02:19:54 +0000 (13:19 +1100)]
nir/glsl: add glsl_record_compare() wrapper

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

2 years agodocs: updated zink features and release notes
Sidney Just [Wed, 23 Mar 2022 06:04:28 +0000 (23:04 -0700)]
docs: updated zink features and release notes

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15504>

2 years agozink: enable pipe cap for win32 external memory and fences
Sidney Just [Wed, 23 Mar 2022 06:00:31 +0000 (23:00 -0700)]
zink: enable pipe cap for win32 external memory and fences

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

2 years agozink: implement device LUID and node mask
Sidney Just [Wed, 23 Mar 2022 05:59:53 +0000 (22:59 -0700)]
zink: implement device LUID and node mask

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

2 years agozink: implement win32 memory handle import
Sidney Just [Sun, 15 May 2022 18:06:23 +0000 (11:06 -0700)]
zink: implement win32 memory handle import

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

2 years agozink: implement win32 fence import
Sidney Just [Wed, 23 Mar 2022 05:57:49 +0000 (22:57 -0700)]
zink: implement win32 fence import

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

2 years agozink: codegen for Win32 external object extensions
Sidney Just [Wed, 23 Mar 2022 05:56:08 +0000 (22:56 -0700)]
zink: codegen for Win32 external object extensions

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

2 years agozink: add win32 guards for device extensions with win32 in name
Mike Blumenkrantz [Mon, 18 Apr 2022 21:26:23 +0000 (17:26 -0400)]
zink: add win32 guards for device extensions with win32 in name

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

2 years agomesa: pipe cap for EXT_memory_object_win32 and EXT_semaphore_win32
Sidney Just [Wed, 23 Mar 2022 05:55:54 +0000 (22:55 -0700)]
mesa: pipe cap for EXT_memory_object_win32 and EXT_semaphore_win32

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15504>

2 years agomesa: implement import win32 memory and semaphore
Sidney Just [Wed, 23 Mar 2022 05:55:32 +0000 (22:55 -0700)]
mesa: implement import win32 memory and semaphore

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15504>

2 years agomesa: implement GL_DEVICE_LUID_EXT and GL_DEVICE_NODE_MASK_EXT getters
Sidney Just [Fri, 29 Apr 2022 19:09:00 +0000 (12:09 -0700)]
mesa: implement GL_DEVICE_LUID_EXT and GL_DEVICE_NODE_MASK_EXT getters

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15504>

2 years agoaux/trace: screen::create_fence_win32
Mike Blumenkrantz [Mon, 18 Apr 2022 21:06:16 +0000 (17:06 -0400)]
aux/trace: screen::create_fence_win32

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

2 years agogallium/trace: implement win32 device LUID and node mask getters
Sidney Just [Wed, 23 Mar 2022 05:45:02 +0000 (22:45 -0700)]
gallium/trace: implement win32 device LUID and node mask getters

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15504>

2 years agogallium/noop: implement pipe_screen::create_fence_win32
Mike Blumenkrantz [Mon, 18 Apr 2022 21:02:52 +0000 (17:02 -0400)]
gallium/noop: implement pipe_screen::create_fence_win32

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

2 years agogallium/noop: implement win32 device LUID and node mask getters
Sidney Just [Wed, 23 Mar 2022 05:44:55 +0000 (22:44 -0700)]
gallium/noop: implement win32 device LUID and node mask getters

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15504>

2 years agomapi: added EXT_external_objects_win32 definitions
Sidney Just [Wed, 23 Mar 2022 06:00:58 +0000 (23:00 -0700)]
mapi: added EXT_external_objects_win32 definitions

Includes implementation stubs

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15504>

2 years agogallium: support for implementing EXT_external_objects_win32
Sidney Just [Fri, 29 Apr 2022 19:09:41 +0000 (12:09 -0700)]
gallium: support for implementing EXT_external_objects_win32

Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15504>

2 years agozink: directly reuse surface ivci when rebinding
Mike Blumenkrantz [Fri, 13 May 2022 18:23:52 +0000 (14:23 -0400)]
zink: directly reuse surface ivci when rebinding

this is simpler and also fixes rebinding samplerviews which use
a levelCount > 1

cc: mesa-stable

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

2 years agozink: fix 3d shader image miplevel calc for depth
Mike Blumenkrantz [Fri, 13 May 2022 15:44:43 +0000 (11:44 -0400)]
zink: fix 3d shader image miplevel calc for depth

without adjusting for miplevel here, the shader image might erroneously
be created as a 2d view and/or assert

cc: mesa-stable

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

2 years agozink: stop leaking shader image surfaces
Mike Blumenkrantz [Fri, 13 May 2022 15:28:37 +0000 (11:28 -0400)]
zink: stop leaking shader image surfaces

the code here was fine for checking the base resource unbinds and whatever,
but it never actually destroyed the surfaces/bufferviews created,
which meant they were always being leaked

cc: mesa-stable

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

2 years agozink: copy incoming shader image struct after doing updates
Mike Blumenkrantz [Fri, 13 May 2022 15:28:08 +0000 (11:28 -0400)]
zink: copy incoming shader image struct after doing updates

no functional changes

cc: mesa-stable

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

2 years agozink: read shader image r/w usage from incoming data struct
Mike Blumenkrantz [Fri, 13 May 2022 15:25:30 +0000 (11:25 -0400)]
zink: read shader image r/w usage from incoming data struct

no functional changes

cc: mesa-stable

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

2 years agozink: simplify dumb update flagging in set_shader_images
Mike Blumenkrantz [Fri, 13 May 2022 15:23:10 +0000 (11:23 -0400)]
zink: simplify dumb update flagging in set_shader_images

cc: mesa-stable

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

2 years agozink: reuse local res pointer in set_shader_images
Mike Blumenkrantz [Fri, 13 May 2022 15:22:50 +0000 (11:22 -0400)]
zink: reuse local res pointer in set_shader_images

no functional changes

cc: mesa-stable

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

2 years agozink: remove refs from shader images
Mike Blumenkrantz [Fri, 13 May 2022 15:18:17 +0000 (11:18 -0400)]
zink: remove refs from shader images

these have implicit refs from the surface/bufferview that gets created,
so adding a ref here is redundant and less performant

cc: mesa-stable

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

2 years agofreedreno/fdperf: support dumping counters
Chia-I Wu [Thu, 12 May 2022 20:04:19 +0000 (13:04 -0700)]
freedreno/fdperf: support dumping counters

This is useful for comparing two workloads.

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

2 years agofreedreno/fdperf: make refresh rate configurable
Chia-I Wu [Thu, 12 May 2022 19:32:12 +0000 (12:32 -0700)]
freedreno/fdperf: make refresh rate configurable

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

2 years agoturnip: let modifier takes precedence over TU_DEBUG=noubwc
Chia-I Wu [Fri, 13 May 2022 22:42:58 +0000 (15:42 -0700)]
turnip: let modifier takes precedence over TU_DEBUG=noubwc

TU_DEBUG=noubwc is not very usable on sway/xwayland where the wsi uses
modifiers.

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

2 years agoanv: fix primitives generated queries values
Lionel Landwerlin [Fri, 13 May 2022 20:22:30 +0000 (23:22 +0300)]
anv: fix primitives generated queries values

Numbers in some situations are incorrect because we don't stall
properly before capturing the register value.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6412
Fixes: a468f26ca5ee ("anv: implement VK_EXT_primitives_generated_query")
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16505>

2 years agosvga: add svga_compile_shader helper function
Charmaine Lee [Fri, 13 May 2022 03:57:22 +0000 (20:57 -0700)]
svga: add svga_compile_shader helper function

This patch refactors common shader compilation code into a helper function
which will call the corresponding shader translation function according to
the shader IR type.

It also adds a function pointer for getting dummy shader for different
shader stages.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16501>

2 years agosvga: create svga_shader_info
Charmaine Lee [Fri, 13 May 2022 04:00:23 +0000 (21:00 -0700)]
svga: create svga_shader_info

This patch adds a new structure svga_shader_info which includes
shader info that is accessed outside of the shader translation
code. That's why it cannot be TGSI specific as we will later also
support NIR. This shader info structure, however, is derived
from the TGSI shader info or the NIR shader info.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16501>

2 years agosvga: add a helper function for common shader creation
Charmaine Lee [Fri, 4 Feb 2022 20:56:21 +0000 (12:56 -0800)]
svga: add a helper function for common shader creation

This patch refactors common shader creation code into a helper function.

Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16501>

2 years agopvr: Fix argument comments in render job submission.
Rajnesh Kanwal [Thu, 12 May 2022 12:14:22 +0000 (13:14 +0100)]
pvr: Fix argument comments in render job submission.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15709>

2 years agopvr: Add vk_sync support and remove service winsys syncobjs interface.
Rajnesh Kanwal [Mon, 28 Mar 2022 13:18:00 +0000 (14:18 +0100)]
pvr: Add vk_sync support and remove service winsys syncobjs interface.

Removing internal pvr_winsys_syncobj abstraction and porting
service winsys syncobj over to vk_sync_type.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15709>

2 years agonir: Use nir_shader_instructions_pass in nir_lower_input_attachments
Jason Ekstrand [Thu, 12 May 2022 19:34:59 +0000 (14:34 -0500)]
nir: Use nir_shader_instructions_pass in nir_lower_input_attachments

This simplifies things a bit and also fixes metadata handling.

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

2 years agonir: Put the builder first in lower_input_attachments helpers
Jason Ekstrand [Thu, 12 May 2022 19:30:54 +0000 (14:30 -0500)]
nir: Put the builder first in lower_input_attachments helpers

This is more idiomatic.

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

2 years agomesa/st: Use lower_indirect_var_derefs in st_nir_lower_builtin
Jason Ekstrand [Thu, 12 May 2022 19:10:32 +0000 (14:10 -0500)]
mesa/st: Use lower_indirect_var_derefs in st_nir_lower_builtin

Instead of having a special NIR helper for GL stuff, we can now use the
more generic helper and do so directly.

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

2 years agomesa/st: Check deref modes in lower_builtin_instr
Jason Ekstrand [Thu, 12 May 2022 19:07:30 +0000 (14:07 -0500)]
mesa/st: Check deref modes in lower_builtin_instr

This is a bit more robust and generally a better pattern as it works
even in the presence of incomplete deref chains on non-uniform variable
modes.

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

2 years agomesa/st: Use nir_shader_instructions_pass for st_nir_lower_builtin
Jason Ekstrand [Thu, 12 May 2022 19:04:14 +0000 (14:04 -0500)]
mesa/st: Use nir_shader_instructions_pass for st_nir_lower_builtin

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

2 years agonir: Add a var set version of lower_indirect_derefs
Jason Ekstrand [Thu, 12 May 2022 18:51:31 +0000 (13:51 -0500)]
nir: Add a var set version of lower_indirect_derefs

This version takes a set of variables and totally lowers indirects on
any variable in the set.  We also rewrite the builtin_uniform version to
use the new helper internally.

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

2 years agonir: Preserve metadata if remove_dead_derefs makes no progress
Jason Ekstrand [Thu, 12 May 2022 18:59:30 +0000 (13:59 -0500)]
nir: Preserve metadata if remove_dead_derefs makes no progress

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

2 years agod3d12: Reduce cost of shader key comparisons
Ken Johnson [Sun, 8 May 2022 01:48:22 +0000 (18:48 -0700)]
d3d12: Reduce cost of shader key comparisons

In drawing-command-heavy scenes, d3d12 is sometimes CPU-bound here.

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

2 years agozink: fix crash on dlclose when zink_internal_create_screen failed
Greg Depoire--Ferrer [Fri, 18 Feb 2022 00:12:49 +0000 (01:12 +0100)]
zink: fix crash on dlclose when zink_internal_create_screen failed

When zink_internal_create_screen fails, it forgot to destroy the
flush queue but still deallocated the memory for it. Then the
automatic destructor that runs when library is unloaded was accessing
freed memory and crashing.

Signed-off-by: Greg Depoire--Ferrer <greg.depoire@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15071>

2 years agoutil/queue: handle thread cration failure in util_queue_adjust_num_threads
Greg Depoire--Ferrer [Fri, 18 Feb 2022 00:11:17 +0000 (01:11 +0100)]
util/queue: handle thread cration failure in util_queue_adjust_num_threads

If a thread cannot be created, make sure the num_threads field is
updated to reflect the actual number of threads.

Signed-off-by: Greg Depoire--Ferrer <greg.depoire@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15071>

2 years agolavapipe: check for error when initializing lvp_queue
Greg Depoire--Ferrer [Fri, 18 Feb 2022 00:09:18 +0000 (01:09 +0100)]
lavapipe: check for error when initializing lvp_queue

When lvp_queue_init fails, propagate the failure to the caller.

Signed-off-by: Greg Depoire--Ferrer <greg.depoire@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15071>

2 years agozink: check for error when initializing util_queue
Greg Depoire--Ferrer [Fri, 18 Feb 2022 00:05:25 +0000 (01:05 +0100)]
zink: check for error when initializing util_queue

When the call to util_queue_init indicates a failure, handle it by
disabling the associated feature (disk cache and thread dispatch) and
telling the user about it.

Signed-off-by: Greg Depoire--Ferrer <greg.depoire@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15071>

2 years agoutil/queue: add missing space to comment in util_queue_destroy
Greg Depoire--Ferrer [Fri, 18 Feb 2022 00:04:06 +0000 (01:04 +0100)]
util/queue: add missing space to comment in util_queue_destroy

Signed-off-by: Greg Depoire--Ferrer <greg.depoire@gmail.com>
Reviewed-By: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15071>

2 years agoamd: change chip_class naming to "enum amd_gfx_level gfx_level"
Marek Olšák [Thu, 12 May 2022 06:50:17 +0000 (02:50 -0400)]
amd: change chip_class naming to "enum amd_gfx_level gfx_level"

This aligns the naming with PAL.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Pierre-Eric Pellou-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16469>

2 years agoradv: advertise VK_EXT_image_2d_view_of_3d
Samuel Pitoiset [Tue, 3 May 2022 06:51:14 +0000 (08:51 +0200)]
radv: advertise VK_EXT_image_2d_view_of_3d

This pass new dEQP-VK.pipeline.*.image_2d_view_3d_image.*.

This should also fix a GPU hang with Deus Ex: Mankind Divided and Zink.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16294>

2 years agoradv: implement VK_EXT_image_2d_view_of_3d
Samuel Pitoiset [Tue, 3 May 2022 06:51:31 +0000 (08:51 +0200)]
radv: implement VK_EXT_image_2d_view_of_3d

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16294>

2 years agoradv,aco: add a workaround for binding 2D views of a 3D image on GFX9
Samuel Pitoiset [Tue, 3 May 2022 08:39:59 +0000 (10:39 +0200)]
radv,aco: add a workaround for binding 2D views of a 3D image on GFX9

The hardware can't bind a slice of a 3D image as a 2D image, GFX10+
introduced ARRAY_PITCH to allow this without a shader workaround.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16294>

2 years agotu: Implement pipeline caching with shared Vulkan cache
Connor Abbott [Thu, 17 Feb 2022 19:48:36 +0000 (20:48 +0100)]
tu: Implement pipeline caching with shared Vulkan cache

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

2 years agotu: Include turnip debug flags in pipeline cache UUID
Connor Abbott [Mon, 9 May 2022 13:16:30 +0000 (15:16 +0200)]
tu: Include turnip debug flags in pipeline cache UUID

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

2 years agotu: Rewrite cache UUID based on radv
Connor Abbott [Mon, 9 May 2022 13:02:17 +0000 (15:02 +0200)]
tu: Rewrite cache UUID based on radv

Switch to using sha1 so that we can add as many other flags as we need
to easily.

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

2 years agotu: Hash pipeline layout contents
Connor Abbott [Thu, 3 Feb 2022 13:41:30 +0000 (14:41 +0100)]
tu: Hash pipeline layout contents

Mostly adapted from anv.

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

2 years agoir3: Add ir3_shader_create_variant()
Connor Abbott [Thu, 17 Feb 2022 11:48:43 +0000 (12:48 +0100)]
ir3: Add ir3_shader_create_variant()

This is similar to ir3_shader_get_variant(), but always compiles the
variant from scratch and returns a variant that's owned by the user
rather than the shader. We'll need this because when variants are stored
in the Vulkan pipeline cache they will outlive their shader.

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

2 years agoir3: Support disabling the pipeline cache
Connor Abbott [Tue, 1 Feb 2022 19:59:22 +0000 (20:59 +0100)]
ir3: Support disabling the pipeline cache

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

2 years agoir3: Add functions to serialize variants
Connor Abbott [Mon, 25 Apr 2022 10:11:17 +0000 (12:11 +0200)]
ir3: Add functions to serialize variants

This will be used by turnip to create free-floating variant objects that
integrate into the Vulkan cache system.

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

2 years agoir3: Remove ir3_shader_variant::shader
Connor Abbott [Wed, 16 Feb 2022 11:58:16 +0000 (12:58 +0100)]
ir3: Remove ir3_shader_variant::shader

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

2 years agotu: Keep original blit shaders separately
Connor Abbott [Wed, 16 Feb 2022 17:01:09 +0000 (18:01 +0100)]
tu: Keep original blit shaders separately

We won't be able to access them once the ->shader link is gone.

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

2 years agoir3: Add ir3_shader_variant::compiler
Connor Abbott [Wed, 16 Feb 2022 16:56:15 +0000 (17:56 +0100)]
ir3: Add ir3_shader_variant::compiler

And replace uses of ->shader->compiler.

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

2 years agoir3: Allocate disasm_info under variant
Connor Abbott [Wed, 16 Feb 2022 16:20:22 +0000 (17:20 +0100)]
ir3: Allocate disasm_info under variant

This shouldn't matter much because it gets stolen later, but the shader
is going away.

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

2 years agoir3: Use ir3_shader_variant::type more often
Connor Abbott [Wed, 16 Feb 2022 17:19:58 +0000 (18:19 +0100)]
ir3: Use ir3_shader_variant::type more often

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

2 years agoir3, fd, tu: Copy misc. info from ir3_shader to ir3_shader_variant
Connor Abbott [Wed, 16 Feb 2022 11:42:45 +0000 (12:42 +0100)]
ir3, fd, tu: Copy misc. info from ir3_shader to ir3_shader_variant

The shader won't be available for deserialized variants, so we need to
include all the info we need for compiling variants to be in the
variant. Most of the things we dug out of the shader were various bits
from nir_shader_info which we move into ir3_shader_variant.

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

2 years agoir3, freedreno, tu: Make ir3_shader_variant store stream_output
Connor Abbott [Wed, 16 Feb 2022 10:42:58 +0000 (11:42 +0100)]
ir3, freedreno, tu: Make ir3_shader_variant store stream_output

This reduces the number of uses of ir3_shader which will be gone when we
deserialize the variant directly.

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

2 years agotu: Delete unused tu_clear_blit GS handling
Connor Abbott [Mon, 31 Jan 2022 15:51:24 +0000 (16:51 +0100)]
tu: Delete unused tu_clear_blit GS handling

This has been unused for a while since we switched to writing the
array index in the VS.

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