Commit Graph

154190 Commits

Author SHA1 Message Date
Marek Olšák 0755d02456 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>
2022-05-16 07:03:39 -04:00
Marek Olšák e9e9086b66 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>
2022-05-16 07:03:39 -04:00
Marek Olšák 8a04a0c95b 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>
2022-05-16 07:03:39 -04:00
Marek Olšák 527e22412a 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>
2022-05-16 07:03:38 -04:00
Marek Olšák ac0becc648 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>
2022-05-16 07:03:38 -04:00
Marek Olšák d21be64b3a 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>
2022-05-16 07:03:37 -04:00
Marek Olšák 593f72aa21 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>
2022-05-16 07:03:37 -04:00
Marek Olšák ceddd7d49a 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>
2022-05-16 07:03:36 -04:00
Martin Roukala (né Peres) 5bc289c547 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>
2022-05-16 09:29:28 +00:00
Samuel Pitoiset 534cc99081 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>
2022-05-16 09:08:49 +00:00
Boris Brezillon 3999fcba15 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>
2022-05-16 07:46:57 +00:00
Samuel Pitoiset b9489ba7d2 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>
2022-05-16 07:28:27 +00:00
Erik Faye-Lund 0ef28ca34a 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>
2022-05-16 07:20:37 +00:00
David Heidelberg 875643feeb 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>
2022-05-16 06:33:36 +00:00
Kyle Russell aa29e0d858 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>
2022-05-16 05:53:05 +00:00
Timothy Arceri 318d8ce6fc 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri 7647023f3b 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri fa9cee4247 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri 4600108ddf 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri e5122a5543 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri e3a45a4778 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri c1fbd0b8ab 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri 99ab530617 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri cba2fd51a2 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri 43a8454ea8 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri 23ea24e11f 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri 5d57bd0345 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri 6dbe075f92 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri 42a97a0aef 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>
2022-05-16 03:33:18 +00:00
Timothy Arceri 7af9459670 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>
2022-05-16 03:33:18 +00:00
Sidney Just 3c0f349a7b 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>
2022-05-15 19:56:49 +00:00
Sidney Just 5fda0a996a 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>
2022-05-15 19:56:49 +00:00
Sidney Just bedfee121c 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>
2022-05-15 19:56:49 +00:00
Sidney Just 34e62bfa80 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>
2022-05-15 19:56:49 +00:00
Sidney Just f1f5627286 zink: implement win32 fence import
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15504>
2022-05-15 19:56:49 +00:00
Sidney Just 7e3d6a0238 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>
2022-05-15 19:56:49 +00:00
Mike Blumenkrantz e978a33587 zink: add win32 guards for device extensions with win32 in name
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15504>
2022-05-15 19:56:49 +00:00
Sidney Just 787d31650b 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>
2022-05-15 19:56:49 +00:00
Sidney Just c709bbde9e 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>
2022-05-15 19:56:49 +00:00
Sidney Just 5e8702f796 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>
2022-05-15 19:56:49 +00:00
Mike Blumenkrantz 8917235d12 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>
2022-05-15 19:56:49 +00:00
Sidney Just a6c468d985 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>
2022-05-15 19:56:49 +00:00
Mike Blumenkrantz a0b2e43927 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>
2022-05-15 19:56:49 +00:00
Sidney Just 08dfe2ca84 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>
2022-05-15 19:56:49 +00:00
Sidney Just e1f6273763 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>
2022-05-15 19:56:49 +00:00
Sidney Just f98d47e011 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>
2022-05-15 19:56:49 +00:00
Mike Blumenkrantz ca915c871f 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>
2022-05-15 19:46:23 +00:00
Mike Blumenkrantz fa3d51892a 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>
2022-05-15 19:46:23 +00:00
Mike Blumenkrantz 1526df283c 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>
2022-05-15 19:46:23 +00:00
Mike Blumenkrantz 2df1c06168 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>
2022-05-15 19:46:23 +00:00