Commit Graph

160837 Commits

Author SHA1 Message Date
Karol Herbst
bd9d276485 rusticl/mem: align fill pattern buffer to 4 bytes
drivers might treat it as a uint32_t* buffer.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18853>
2022-10-01 12:27:19 +00:00
Caio Oliveira
988c45ae12 spirv: Enable OpEmitMeshTasksEXT workaround for Clay Shader Compiler
Clay Shader Compiler is the SPIR-V generator used by GravityMark benchmark.

Fixes #7368.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18894>
2022-10-01 03:59:20 +00:00
Karol Herbst
df84c89d96 rusticl/mem: fix image OOB checks
The CL API puts the array layer on the height, where gallium puts it on
the depth. This is taken into account everywhere else, except for API
validation.

Fixes: 8b9a5adf8b ("rusticl/mem: return errors for OOB accesses")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18852>
2022-10-01 03:43:10 +00:00
Mike Blumenkrantz
1af804d554 delete graw tests
These seem abandoned and they make interfaces changes less easy.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18705>
2022-10-01 03:17:33 +00:00
Mike Blumenkrantz
4b0f28d706 delete rbug
These seem abandoned and they make interfaces changes less easy.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18705>
2022-10-01 03:17:33 +00:00
Mike Blumenkrantz
8cc766d8f7 remove xvmc
These seem abandoned and they make interfaces changes less easy.

Acked-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18705>
2022-10-01 03:17:33 +00:00
Mike Blumenkrantz
0b81ff0193 zink: set depth clamp
this is correct according to spec

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
2d6fa1dcdf zink: define zink_pipeline_dynamic_state3 as zink_rasterizer_hw_state
this ensures the structs are kept in sync

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
50a7ac1bb2 zink: reenable GPL
this is now functional again

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
11c4d79709 zink: use an extra pipeline state bit to track coherent fbfetch usage for gpl outputs
bringing parity to non-gpl codepath

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
617ee2855b zink: don't deref prog->shaders during pipeline construction
this may or may not be valid depending on (upcoming) threading changes,
and the nir pointers are all readily available

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
9b76fc4033 zink: reorder zink_destroy_gfx_program()
this ensures that pipeline cache entries are freed before shaders

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
f63944f694 zink: move binding_map to hw_state part of vertex state
this is used when dynamic states aren't used

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
dd9e5fea20 zink: add param to disable optimization when combining pipeline libraries
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
203daf97c6 zink: require optimal_keys for GPL
this is pointless otherwise

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
53a5291803 zink: set VK_PIPELINE_CREATE_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
c4dc3adff2 zink: further compress zink_gfx_output_key lookups
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
764e800886 zink: compress zink_gfx_output_key members
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
4c228f00a2 zink: don't access prog->shaders array during pipeline compile
this may or may not have valid data

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18911>
2022-10-01 02:18:39 +00:00
Mike Blumenkrantz
e7ede96f3f zink: add tgl ci skip
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18921>
2022-10-01 01:55:26 +00:00
Dawn Han
23f5936ec6 venus: Update mutable descriptor struct type
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18766>
2022-10-01 00:50:15 +00:00
Dawn Han
0737ad8f86 venus: support the promoted VK_EXT_mutable_descriptor_type
Signed-off-by: Dawn Han <dawnhan@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18766>
2022-10-01 00:50:15 +00:00
Roland Scheidegger
0dec967ca9 gallivm: remove dead cube map lod calculation code
Since commit d413fd0219 ("gallivm: Always take the per-pixel LOD path
for cubemaps.") the special cube rho code was not used anymore.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18892>
2022-10-01 00:27:19 +00:00
Bas Nieuwenhuizen
0e6d44d14f vulkan/wsi/x11: Fix double free of modifiers.
Breaks radv when modifiers are used.

Fixes: 8775f08bf1 ("vulkan/wsi/x11: Configure images via params passed to wsi_swapchain_init()")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7386
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7398
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-By: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18919>
2022-09-30 23:39:25 +00:00
Mike Blumenkrantz
a5b8466e4a zink: use more dynamic state3 when available
this is an all-or-nothing type of thing, where either all the blend/ms
states are available or they aren't

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18890>
2022-09-30 23:17:25 +00:00
Mike Blumenkrantz
c7f46d2ad6 zink: use dynamic state3 rasterization states when available
this massively reduces the number of pipelines required

also temporarily disable GPL until a few more patches land since something's
weird and broken

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18890>
2022-09-30 23:17:25 +00:00
Mike Blumenkrantz
57f966ed1e lavapipe: improve blend handling on pipeline binds
* use renderpass info for independent blend
* only reset blend state if no color attachments

Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18913>
2022-09-30 21:20:03 +00:00
Rhys Perry
7e54fea373 aco: fix assembler.gfx11.vinterp test
This was missed. I guess CI doesn't have a recent enough LLVM for these
tests.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17710>
2022-09-30 20:57:02 +00:00
Rhys Perry
4544490df0 aco: limit hard clauses to 63 instructions
See https://reviews.llvm.org/D127391

fossil-db (gfx1100):
Totals from 4 (0.00% of 161689) affected shaders:
Latency: 24545 -> 24539 (-0.02%)
InvThroughput: 102867 -> 102835 (-0.03%)

fossil-db (navi10):
Totals from 4 (0.00% of 161220) affected shaders:
Latency: 25969 -> 25959 (-0.04%)
InvThroughput: 112917 -> 112869 (-0.04%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17710>
2022-09-30 20:57:02 +00:00
Rhys Perry
a406b36d30 aco/gfx11: update form_hard_clauses
See https://reviews.llvm.org/D127391

fossil-db (gfx1100):
Totals from 116 (0.07% of 161689) affected shaders:
Instrs: 124719 -> 124664 (-0.04%); split: -0.06%, +0.02%
CodeSize: 731660 -> 731440 (-0.03%); split: -0.04%, +0.01%
Latency: 2771695 -> 2771671 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 1050309 -> 1050312 (+0.00%)
VClause: 3731 -> 3779 (+1.29%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17710>
2022-09-30 20:57:02 +00:00
Rhys Perry
2930317cea aco/gfx11: deallocate VGPRs at the end of the shader
fossil-db (gfx1100):
Totals from 65987 (40.81% of 161689) affected shaders:
Instrs: 57123207 -> 57199947 (+0.13%)
CodeSize: 308402500 -> 308709460 (+0.10%)
Latency: 680527139 -> 680527160 (+0.00%)
InvThroughput: 131620026 -> 131620045 (+0.00%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17710>
2022-09-30 20:57:02 +00:00
Rhys Perry
6407d783ea aco: update sendmsg enum from LLVM
Add GFX11 enums and some new ones that apparently existed before.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17710>
2022-09-30 20:57:02 +00:00
Rhys Perry
7cecc81683 aco/gfx11: fix s_waitcnt printing
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17710>
2022-09-30 20:57:02 +00:00
Rhys Perry
7b21af3f51 aco: improve wait_imm unpack
Add GFX11 support and use wait_imm::unset_counter. Looping in the waitcnt
pass was probably broken on GFX11 because of this.

fossil-db (gfx1100):
Totals from 899 (0.56% of 161689) affected shaders:
Instrs: 1319368 -> 1319179 (-0.01%)
CodeSize: 7124640 -> 7123884 (-0.01%)
Latency: 26554304 -> 26404606 (-0.56%)
InvThroughput: 9032485 -> 8978773 (-0.59%); split: -0.59%, +0.00%

No navi10 fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17710>
2022-09-30 20:57:02 +00:00
Rhys Perry
39a6067635 aco/gfx11: swap ds_cmpst_* data operands
According to an LLVM comment, these are swapped in GFX11.

No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17710>
2022-09-30 20:57:02 +00:00
SoroushIMG
6ac3f9d64e zink: enable loop unrolling for loops that have soft fp64
The info that a loop contains fp64 ops is lost after full
software lowering.
Therefore, specifically unroll these loops in zink instead of
in vulkan, where the blown up body is no longer unrolled.
This helps a lot in KHR-Single-GL46.arrays_of_arrays_gl.SubroutineFunctionCalls2.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
2022-09-30 17:07:37 +00:00
SoroushIMG
1e8e785a07 nir: allow to fine tune unrolling for loops with soft fp64 ops
Lowered fp64 ops can blow up the loop bodies while still being
suitable for unrolling.
Allow for using different parameters to unroll loops with
soft fp64.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
2022-09-30 17:07:37 +00:00
SoroushIMG
121f30005f nir: track whether a loop contains soft fp64 ops
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
2022-09-30 17:07:37 +00:00
SoroushIMG
bcbcc25602 zink: fix spirv temp func variable class emission
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
2022-09-30 17:07:37 +00:00
SoroushIMG
d2e2b9bb80 zink: fix nir_op_unpack_64_2x32 emission
Cc: mesa-stable
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
2022-09-30 17:07:37 +00:00
SoroushIMG
d20c82b785 zink: lower 64bit pack when float64 not supported
SPIRV ops for 64bit pack/unpack require float64 cap.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
2022-09-30 17:07:37 +00:00
SoroushIMG
e7afa9cddf zink: optimise lower_64bit_vars for when int64 is supported
There are vulkan drivers that support Int64 but not Float64.
Optimise the 64bit lowering by converting doubles to uint64,
but keep matrix lowerig to float as glsl int64 matrices do
not exist.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
2022-09-30 17:07:37 +00:00
SoroushIMG
5a831be1ac zink: lower 64bit vars for drivers without float64
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18863>
2022-09-30 17:07:37 +00:00
Mike Blumenkrantz
a47b9f2b6f zink: call flush_resource when presenting garbage
this ensures the resource is queued for presentation

fixes #7359

Fixes: babf9474c4 ("zink: rework flush_frontbuffer to always flush")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18899>
2022-09-30 16:40:43 +00:00
Corentin Noël
0a6aa58aca ci: Remove Wno-error=stringop-truncation from debian-arm64-asan
All the warnings are now fixed.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18613>
2022-09-30 12:38:11 +00:00
Corentin Noël
4a1bde9fb0 gallium/hud: use snprintf(..., "%s", ...) instead of strncpy
This fixes a warning with stringop-truncation:
```
error: 'strncpy' output may be truncated copying 127 bytes from a string of length 255 [-Werror=stringop-truncation]
 1443 |             strncpy(graph->name, s, sizeof(graph->name)-1);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18613>
2022-09-30 12:38:11 +00:00
Corentin Noël
9718c88baf mesa/main: do not copy the exact size of the string
This fixes a compiler warning with stringop-truncation:
```
error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
  286 |    strncpy(s, msg, MAX_DEBUG_MESSAGE_LENGTH);
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18613>
2022-09-30 12:38:11 +00:00
Rhys Perry
2cdb3e4b6b aco: add VMEMtoScalarWriteHazard tests
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18270>
2022-09-30 11:44:38 +00:00
Rhys Perry
4c327dcfbc aco: improve printing of s_waitcnt_depctr
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18270>
2022-09-30 11:44:38 +00:00
Rhys Perry
27305680e2 aco: improve printing of sgpr_null
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18270>
2022-09-30 11:44:38 +00:00