platform/upstream/mesa.git
21 months agomesa: replace ALLOC_PRIMS with persistently-allocated context arrays
Marek Olšák [Sun, 14 Aug 2022 03:52:46 +0000 (23:52 -0400)]
mesa: replace ALLOC_PRIMS with persistently-allocated context arrays

This is cleaner.

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

21 months agoradv: Build acceleration structures using BVH IR
Friedrich Vock [Sat, 24 Sep 2022 20:10:02 +0000 (22:10 +0200)]
radv: Build acceleration structures using BVH IR

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769>

21 months agoradv: Create pipelines for conversion meta shaders
Friedrich Vock [Fri, 23 Sep 2022 14:02:37 +0000 (16:02 +0200)]
radv: Create pipelines for conversion meta shaders

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769>

21 months agoradv: Add conversion shader for leaf nodes
Friedrich Vock [Wed, 21 Sep 2022 13:09:55 +0000 (15:09 +0200)]
radv: Add conversion shader for leaf nodes

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769>

21 months agoradv: Add conversion shader for internal nodes
Friedrich Vock [Mon, 19 Sep 2022 21:16:10 +0000 (23:16 +0200)]
radv: Add conversion shader for internal nodes

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769>

21 months agoradv: Add BVH IR types
Friedrich Vock [Thu, 22 Sep 2022 20:47:11 +0000 (22:47 +0200)]
radv: Add BVH IR types

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769>

21 months agoradv: Split CmdBuildAccelerationStructuresKHR into different functions
Friedrich Vock [Wed, 21 Sep 2022 14:02:36 +0000 (16:02 +0200)]
radv: Split CmdBuildAccelerationStructuresKHR into different functions

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769>

21 months agoradv: Rename internal node shader to lbvh_internal
Friedrich Vock [Mon, 19 Sep 2022 21:15:31 +0000 (23:15 +0200)]
radv: Rename internal node shader to lbvh_internal

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18769>

21 months agozink: only emit runtime array for ssbos if present
Mike Blumenkrantz [Wed, 14 Sep 2022 18:17:22 +0000 (14:17 -0400)]
zink: only emit runtime array for ssbos if present

it's impossible to accurately determine whether an op will use the base,
sized array or the unsized array due to dynamic indexing, and thus it's
impossible to not violate spec by emitting both arrays at offset=0 so they
can overlap

so instead, just emit the runtime array and blast all bounds checking in
vk drivers into the void

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

21 months agozink: remove color_write_missing driver workaround
Mike Blumenkrantz [Wed, 14 Sep 2022 12:18:30 +0000 (08:18 -0400)]
zink: remove color_write_missing driver workaround

this is no longer used

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

21 months agozink: allow reordered clear_buffer calls
Mike Blumenkrantz [Fri, 9 Sep 2022 14:42:49 +0000 (10:42 -0400)]
zink: allow reordered clear_buffer calls

rare to hit, but no point in not promoting them when possible

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

21 months agozink: avoid overflow when clamping bufferviews
Mike Blumenkrantz [Wed, 7 Sep 2022 17:21:28 +0000 (13:21 -0400)]
zink: avoid overflow when clamping bufferviews

cc: mesa-stable

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

21 months agozink: name bo variables using bitsize
Mike Blumenkrantz [Thu, 15 Sep 2022 13:58:08 +0000 (09:58 -0400)]
zink: name bo variables using bitsize

debugging++

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

21 months agozink: fix handling for ssbos that are just runtime arrays
Mike Blumenkrantz [Mon, 12 Sep 2022 15:08:20 +0000 (11:08 -0400)]
zink: fix handling for ssbos that are just runtime arrays

this used to correctly calculate runtime array size as zero, but since the
switch to glsl_get_explicit_size(), zero can no longer be returned

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

21 months agozink: fix sparse queue creation
Mike Blumenkrantz [Mon, 19 Sep 2022 14:14:26 +0000 (10:14 -0400)]
zink: fix sparse queue creation

to use an explicit sparse queue, it has to actually be created along with
the device

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

21 months agozink: always unset var->data.explicit_xfb_buffer
Mike Blumenkrantz [Sun, 25 Sep 2022 19:11:04 +0000 (15:11 -0400)]
zink: always unset var->data.explicit_xfb_buffer

ensure that this isn't accidentally triggering for non-xfb shaders

Fixes: 6d40db84c9d ("zink: handle direct xfb output from output variables")

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

21 months agozink: free vertex_state_cache on shutdown
Mike Blumenkrantz [Fri, 23 Sep 2022 13:46:43 +0000 (09:46 -0400)]
zink: free vertex_state_cache on shutdown

cc: mesa-stable

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

21 months agozink: fix some batch tracking leaks
Mike Blumenkrantz [Fri, 23 Sep 2022 13:46:10 +0000 (09:46 -0400)]
zink: fix some batch tracking leaks

not leaking over time, just leaking on shutdown

Fixes: 83c76b8efbf ("zink: rework batch tracking for resources")

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

21 months agozink: add asserts to verify optimal key state
Mike Blumenkrantz [Mon, 26 Sep 2022 17:46:20 +0000 (13:46 -0400)]
zink: add asserts to verify optimal key state

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

21 months agozink: copy optimal key always
Mike Blumenkrantz [Mon, 26 Sep 2022 17:46:10 +0000 (13:46 -0400)]
zink: copy optimal key always

this is going away in the future, but for now it's annoying

Fixes: 7336580408a ("zink: unspaghettify some program update code")

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

21 months agoiris: Ignore aux for copy_region source if there's no unresolved color
Kenneth Graunke [Fri, 23 Sep 2022 05:50:37 +0000 (22:50 -0700)]
iris: Ignore aux for copy_region source if there's no unresolved color

This mirrors the behavior of iris_resource_texture_aux_usage(), which
bypasses the aux metadata when there's no advantage to using it.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18790>

21 months agolavapipe: propagate shader access info across libraries
Mike Blumenkrantz [Mon, 26 Sep 2022 19:22:35 +0000 (15:22 -0400)]
lavapipe: propagate shader access info across libraries

cc: mesa-stable

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

21 months agolavapipe: set writemask for compute shader buffers
Mike Blumenkrantz [Mon, 26 Sep 2022 18:41:31 +0000 (14:41 -0400)]
lavapipe: set writemask for compute shader buffers

I don't know how this wasn't being set?

cc: mesa-stable

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

21 months agod3d12: Replace size_t with uint64_t in d3d12_video_encoder definitions for cross...
Sil Vilerino [Mon, 26 Sep 2022 11:59:11 +0000 (07:59 -0400)]
d3d12: Replace size_t with uint64_t in d3d12_video_encoder definitions for cross-plat compatibility

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18821>

21 months agozink: unspaghettify some program update code
Mike Blumenkrantz [Tue, 6 Sep 2022 16:35:43 +0000 (12:35 -0400)]
zink: unspaghettify some program update code

the initial implementation of optimal_keys was added inline, but really
it's an entirely different codepath. by separating these out, it makes the
code more readable, and it also allows for slightly better optimization of
of the optimal_keys codepath

~4-5% improvement for drawoverhead -test 7

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

21 months agozink: be even more granular with optimal_key program updates
Mike Blumenkrantz [Fri, 2 Sep 2022 15:13:44 +0000 (11:13 -0400)]
zink: be even more granular with optimal_key program updates

since the bits of each key are easily and efficiently comparable,
the draw-time updating here can be made extremely granular to
update exactly the stages that have changed since the last
time the program was used, further reducing overhead instead of
updating every possible key value

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

21 months agozink: simplify bit tracking in zink_gfx_program_update()
Mike Blumenkrantz [Fri, 2 Sep 2022 15:08:46 +0000 (11:08 -0400)]
zink: simplify bit tracking in zink_gfx_program_update()

much nicer now that gfx dirty bits are isolated

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

21 months agozink: split dirty_shader_stages for gfx and compute
Mike Blumenkrantz [Fri, 2 Sep 2022 15:07:34 +0000 (11:07 -0400)]
zink: split dirty_shader_stages for gfx and compute

this simplifies/clarifies a lot of related code

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

21 months agozink: use optimal_keys to massively reduce size of pipeline cache comparisons
Mike Blumenkrantz [Thu, 1 Sep 2022 20:52:27 +0000 (16:52 -0400)]
zink: use optimal_keys to massively reduce size of pipeline cache comparisons

since the entire pipeline module key is a uint32_t, this value can be used
for comparisons instead of comparing every shader module

ideally in the future more drivers will support the required features for
optimal_keys, allowing the other variant functions to be deleted

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

21 months agozink: add 'optimal_keys' handling for shader keys
Mike Blumenkrantz [Thu, 1 Sep 2022 19:56:06 +0000 (15:56 -0400)]
zink: add 'optimal_keys' handling for shader keys

if it's known on init that there are no variants for nonseamless cubes,
or inlined values, or decomposed vertex attrs, then shader keys can be
compressed more optimally to reduce the work needed on program updates

more importantly, this reduces the total hash value for all the shader
modules to a single uint32_t (technically 24 bits), which is much better
than having to manage and incrementally add all the separte module hashes

...but for now using this is incompatible with gpl, so disable that

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

21 months agozink: add some padding to small shader keys for byte-alignment
Mike Blumenkrantz [Thu, 1 Sep 2022 19:55:46 +0000 (15:55 -0400)]
zink: add some padding to small shader keys for byte-alignment

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

21 months agozink: ALWAYS_INLINE bind_gfx_stage
Mike Blumenkrantz [Thu, 1 Sep 2022 17:53:22 +0000 (13:53 -0400)]
zink: ALWAYS_INLINE bind_gfx_stage

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

21 months agozink: move to AoS for gfx program shader modules
Mike Blumenkrantz [Thu, 1 Sep 2022 17:45:53 +0000 (13:45 -0400)]
zink: move to AoS for gfx program shader modules

this matches up better with the actual usage; the zink_shader_module
is still stored in the shader cache

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

21 months agozink: copy the non-dirty shader stages when updating gfx program
Mike Blumenkrantz [Thu, 1 Sep 2022 17:37:41 +0000 (13:37 -0400)]
zink: copy the non-dirty shader stages when updating gfx program

typo during refactoring

Fixes: d8455e5ebfa ("zink: change u_foreach_bit to regular for loop in zink_gfx_program_update")

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

21 months agozink: handle inline uniforms during first-time shader generation
Mike Blumenkrantz [Thu, 1 Sep 2022 17:33:44 +0000 (13:33 -0400)]
zink: handle inline uniforms during first-time shader generation

this is unlikely but possible

Fixes: a0e69e7601a ("zink: split out first-time shader module creation")

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

21 months agozink: remove a bunch of casts from shader key inlines
Mike Blumenkrantz [Thu, 1 Sep 2022 17:19:54 +0000 (13:19 -0400)]
zink: remove a bunch of casts from shader key inlines

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

21 months agozink: wrap zink_shader_key_base access for nonseamless cubemap use
Mike Blumenkrantz [Thu, 1 Sep 2022 17:07:39 +0000 (13:07 -0400)]
zink: wrap zink_shader_key_base access for nonseamless cubemap use

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

21 months agozink: check on init whether decomposed attrs are needed
Mike Blumenkrantz [Thu, 1 Sep 2022 16:57:56 +0000 (12:57 -0400)]
zink: check on init whether decomposed attrs are needed

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

21 months agozink: add a bool flag for decomposed vertex elements
Mike Blumenkrantz [Thu, 1 Sep 2022 16:32:11 +0000 (12:32 -0400)]
zink: add a bool flag for decomposed vertex elements

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

21 months agoci/crocus: update ci results
Erik Faye-Lund [Mon, 26 Sep 2022 12:56:14 +0000 (14:56 +0200)]
ci/crocus: update ci results

Seems we haven't been running the Crocus CI much lately, and some things
has changed. The new failures needs to be investegated and fixed, but
let's update the results for now.

Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18822>

21 months agoaco: mostly implement FS input loads on GFX11
Rhys Perry [Mon, 20 Jun 2022 17:11:07 +0000 (18:11 +0100)]
aco: mostly implement FS input loads on GFX11

Quad-divergent CF and vertex selection doesn't work, but should at least
prevent crashes.

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/17333>

21 months agoaco/tests: add GFX11 assembly tests
Rhys Perry [Fri, 17 Jun 2022 16:42:35 +0000 (17:42 +0100)]
aco/tests: add GFX11 assembly 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/17333>

21 months agoaco: omit read-only memory_sync_info when printing
Rhys Perry [Mon, 18 Jul 2022 19:44:21 +0000 (20:44 +0100)]
aco: omit read-only memory_sync_info when 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/17333>

21 months agoaco: add VINTERP instruction format
Rhys Perry [Fri, 17 Jun 2022 12:53:08 +0000 (13:53 +0100)]
aco: add VINTERP instruction format

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/17333>

21 months agoaco: add LDSDIR instruction format
Rhys Perry [Fri, 17 Jun 2022 12:53:08 +0000 (13:53 +0100)]
aco: add LDSDIR instruction format

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/17333>

21 months agoaco: limit GFX11 to 128 VGPRs for now
Rhys Perry [Tue, 9 Aug 2022 18:29:34 +0000 (19:29 +0100)]
aco: limit GFX11 to 128 VGPRs for now

See https://reviews.llvm.org/D128054

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/17333>

21 months agoaco: update assembler for GFX11
Rhys Perry [Fri, 17 Jun 2022 10:23:00 +0000 (11:23 +0100)]
aco: update assembler for GFX11

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/17333>

21 months agoaco/gfx11: don't use more than 1 NSA dword
Rhys Perry [Thu, 14 Jul 2022 14:37:07 +0000 (15:37 +0100)]
aco/gfx11: don't use more than 1 NSA dword

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/17333>

21 months agoaco: add GFX11 opcode numbers
Rhys Perry [Thu, 16 Jun 2022 17:15:16 +0000 (18:15 +0100)]
aco: add GFX11 opcode numbers

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/17333>

21 months agoaco: fix assembly of MUBUF-to-LDS loads
Rhys Perry [Fri, 17 Jun 2022 15:25:42 +0000 (16:25 +0100)]
aco: fix assembly of MUBUF-to-LDS loads

These have an implicit m0 read and don't write VGPRs.

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/17333>

21 months agoaco: add reg() helper to assembler
Rhys Perry [Thu, 16 Jun 2022 18:36:24 +0000 (19:36 +0100)]
aco: add reg() helper to assembler

SGPR encoding is slightly different on GFX11.

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/17333>

21 months agoaco: rename Interp_instruction to VINTRP_instruction
Rhys Perry [Wed, 14 Sep 2022 10:19:30 +0000 (11:19 +0100)]
aco: rename Interp_instruction to VINTRP_instruction

These is clearer since GFX11 adds another interpolation format.

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/17333>

21 months agoradeonsi/vcn: support async
Ruijing Dong [Fri, 23 Sep 2022 13:52:15 +0000 (09:52 -0400)]
radeonsi/vcn: support async

enable async for vcn

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18781>

21 months agoaco: Fixes compiling error about char8_t with c++20
Yonggang Luo [Sat, 24 Sep 2022 18:47:00 +0000 (02:47 +0800)]
aco: Fixes compiling error about char8_t with c++20

The error is:
../mesa/src/amd/compiler/aco_register_allocation.cpp:382:7: error: no matching function for call to 'printf'
      printf(u8"☐");

Fixes: 209a89e51d1 ("aco: Convert to use u8 literal for Unicode character to fixes msvc warning")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7318

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18796>

21 months agoradv/rt: inline radv_rt_pipeline_create_() helper into radv_rt_pipeline_create()
Daniel Schürmann [Thu, 22 Sep 2022 14:46:47 +0000 (16:46 +0200)]
radv/rt: inline radv_rt_pipeline_create_() helper into radv_rt_pipeline_create()

This saves some re-allocation and will help in future with RT shader functions.

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

21 months agoradv/rt: create separate radv_rt_pipeline struct
Daniel Schürmann [Thu, 22 Sep 2022 13:26:01 +0000 (15:26 +0200)]
radv/rt: create separate radv_rt_pipeline struct

inherited from radv_compute_pipeline to contain all RT-related information.
This will make it easier to transition to RT shader functions.

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

21 months agopvr: Fix assignment to ISP back_a.sref
Matt Coster [Mon, 5 Sep 2022 14:56:12 +0000 (15:56 +0100)]
pvr: Fix assignment to ISP back_a.sref

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <karmjit.mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18778>

21 months agoradv: use direct access to last_vgt_api_stage_locs for sgpr emission
Mike Blumenkrantz [Wed, 7 Sep 2022 20:14:45 +0000 (16:14 -0400)]
radv: use direct access to last_vgt_api_stage_locs for sgpr emission

radv_lookup_user_sgpr is heavy, stop using it

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

21 months agoradv: store pointer to sgprs for last vertex stage
Mike Blumenkrantz [Wed, 7 Sep 2022 20:06:15 +0000 (16:06 -0400)]
radv: store pointer to sgprs for last vertex stage

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

21 months agonir: use nir_shader_instructions_pass in nir_split_per_member_structs
Marcin Ślusarz [Tue, 10 Aug 2021 09:50:04 +0000 (11:50 +0200)]
nir: use nir_shader_instructions_pass in nir_split_per_member_structs

Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
  is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_split_var_copies
Marcin Ślusarz [Tue, 10 Aug 2021 09:43:55 +0000 (11:43 +0200)]
nir: use nir_shader_instructions_pass in nir_split_var_copies

No functional changes.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_samplers
Marcin Ślusarz [Tue, 10 Aug 2021 09:15:57 +0000 (11:15 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_samplers

No functional changes.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_interpolation
Marcin Ślusarz [Mon, 9 Aug 2021 15:07:04 +0000 (17:07 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_interpolation

Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
  is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_metadata_none instead of its value
Marcin Ślusarz [Mon, 9 Aug 2021 14:46:38 +0000 (16:46 +0200)]
nir: use nir_metadata_none instead of its value

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_frexp
Marcin Ślusarz [Mon, 9 Aug 2021 14:43:13 +0000 (16:43 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_frexp

Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_fb_read
Marcin Ślusarz [Mon, 9 Aug 2021 14:06:06 +0000 (16:06 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_fb_read

Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
  is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_drawpixels
Marcin Ślusarz [Mon, 9 Aug 2021 13:57:41 +0000 (15:57 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_drawpixels

Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
  is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_clip_halfz
Marcin Ślusarz [Mon, 9 Aug 2021 13:12:48 +0000 (15:12 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_clip_halfz

Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
  is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_clip_disable
Marcin Ślusarz [Mon, 9 Aug 2021 13:06:35 +0000 (15:06 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_clip_disable

Changes:
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
  is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_clamp_color_outputs
Marcin Ślusarz [Mon, 9 Aug 2021 12:43:45 +0000 (14:43 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_clamp_color_outputs

Changes:
- removal of lower_state (not needed anymore)
- nir_metadata_preserve(..., nir_metadata_block_index | nir_metadata_dominance)
  is called only when pass makes progress
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_64bit_phis
Marcin Ślusarz [Mon, 9 Aug 2021 12:36:46 +0000 (14:36 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_64bit_phis

No functional changes.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_bool_to_int32
Marcin Ślusarz [Mon, 9 Aug 2021 11:56:07 +0000 (13:56 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_bool_to_int32

No functional changes.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_bool_to_float
Marcin Ślusarz [Mon, 9 Aug 2021 11:50:53 +0000 (13:50 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_bool_to_float

Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_bool_to_bitsize
Marcin Ślusarz [Mon, 9 Aug 2021 11:45:27 +0000 (13:45 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_bool_to_bitsize

Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agonir: use nir_shader_instructions_pass in nir_lower_alu
Marcin Ślusarz [Fri, 6 Aug 2021 14:47:22 +0000 (16:47 +0200)]
nir: use nir_shader_instructions_pass in nir_lower_alu

Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress
- only metadata of the current function is invalidated (invalidation on
  one function was leaking to successive functions because "progress"
  was not reset)

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agoglsl: use nir_shader_instructions_pass in gl_nir_lower_samplers_as_deref
Marcin Ślusarz [Fri, 6 Aug 2021 13:36:18 +0000 (15:36 +0200)]
glsl: use nir_shader_instructions_pass in gl_nir_lower_samplers_as_deref

No functional changes.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agoglsl: use nir_shader_instructions_pass in gl_nir_lower_images
Marcin Ślusarz [Fri, 6 Aug 2021 13:31:34 +0000 (15:31 +0200)]
glsl: use nir_shader_instructions_pass in gl_nir_lower_images

No functional changes.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agoglsl: use nir_shader_instructions_pass in gl_nir_lower_atomics
Marcin Ślusarz [Fri, 6 Aug 2021 13:23:56 +0000 (15:23 +0200)]
glsl: use nir_shader_instructions_pass in gl_nir_lower_atomics

Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agocrocus: remove invalid nir_metadata_preserve from crocus_fix_edge_flags
Marcin Ślusarz [Fri, 6 Aug 2021 13:06:28 +0000 (15:06 +0200)]
crocus: remove invalid nir_metadata_preserve from crocus_fix_edge_flags

nir_metadata_preserve(NULL, ...) doesn't make any sense.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agoiris: remove invalid nir_metadata_preserve from iris_fix_edge_flags
Marcin Ślusarz [Fri, 6 Aug 2021 13:02:10 +0000 (15:02 +0200)]
iris: remove invalid nir_metadata_preserve from iris_fix_edge_flags

nir_metadata_preserve(NULL, ...) doesn't make any sense.

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agoradv: use nir_shader_instructions_pass in radv_nir_lower_ycbcr_textures
Marcin Ślusarz [Fri, 6 Aug 2021 10:51:37 +0000 (12:51 +0200)]
radv: use nir_shader_instructions_pass in radv_nir_lower_ycbcr_textures

Changes:
- nir_metadata_preserve(..., nir_metadata_all) is called when pass doesn't
  make progress

Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12282>

21 months agoradv: ALWAYS_INLINE radv_is_streamout_enabled()
Mike Blumenkrantz [Mon, 12 Sep 2022 20:03:01 +0000 (16:03 -0400)]
radv: ALWAYS_INLINE radv_is_streamout_enabled()

v2 by Timur Kristóf:
- Use ALWAYS_INLINE instead of just inline.

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

21 months agoradv: ALWAYS_INLINE radv_flush_descriptors
Mike Blumenkrantz [Mon, 12 Sep 2022 20:00:32 +0000 (16:00 -0400)]
radv: ALWAYS_INLINE radv_flush_descriptors

B I G  P E R F

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

21 months agoradv: ALWAYS_INLINE radv_after_draw
Mike Blumenkrantz [Mon, 12 Sep 2022 18:13:10 +0000 (14:13 -0400)]
radv: ALWAYS_INLINE radv_after_draw

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

21 months agoradv: enable NGG culling unconditionally for GPL but disable it dynamically
Samuel Pitoiset [Mon, 19 Sep 2022 16:51:20 +0000 (18:51 +0200)]
radv: enable NGG culling unconditionally for GPL but disable it dynamically

When compiling the pre-rasterization stages we don't know the primitive
topology, but we still want to enable NGG culling for performance. To
achieve that, NGG culling is enabled unconditionally when the topology
is unknown and disabled dynamically for points or lines.

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/18776>

21 months agoradv: use the maximum number of vertices per primitives for NGG with GPL
Samuel Pitoiset [Fri, 23 Sep 2022 11:39:50 +0000 (13:39 +0200)]
radv: use the maximum number of vertices per primitives for NGG with GPL

The hw will ignore the extra bits when points/lines are drawn, so this
just works as-is.

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/18776>

21 months agoradv: determine the last VGT api stage also for GPL
Samuel Pitoiset [Fri, 23 Sep 2022 11:47:41 +0000 (13:47 +0200)]
radv: determine the last VGT api stage also for GPL

When compiling the pre-rasterization stages, we need to know this.

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/18776>

21 months agoradv: remove useless gfx10_ngg_info::enable_vertex_grouping
Samuel Pitoiset [Mon, 19 Sep 2022 16:43:16 +0000 (18:43 +0200)]
radv: remove useless gfx10_ngg_info::enable_vertex_grouping

It's always TRUE and this will simplify future 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/18776>

21 months agoradv: allow to build the pre-rasterization stages in a library
Samuel Pitoiset [Mon, 19 Sep 2022 12:24:34 +0000 (14:24 +0200)]
radv: allow to build the pre-rasterization stages in a library

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/18672>

21 months agoradv: determine the last VGT api stage from the active_stages bitfield
Samuel Pitoiset [Mon, 19 Sep 2022 12:24:32 +0000 (14:24 +0200)]
radv: determine the last VGT api stage from the active_stages bitfield

With GPL, we can get binaries from libs directly, so this would fail.

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/18672>

21 months agoradv: import the GS copy shader from a library if present
Samuel Pitoiset [Tue, 13 Sep 2022 16:06:47 +0000 (18:06 +0200)]
radv: import the GS copy shader from a library if present

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/18672>

21 months agoradv: do not free the GS copy shader binary if created from a library
Samuel Pitoiset [Tue, 13 Sep 2022 16:06:21 +0000 (18:06 +0200)]
radv: do not free the GS copy shader binary if created from a library

Similar to other shader stages.

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/18672>

21 months agogallivm: fix buffer_type for LLVM 15
Dave Airlie [Mon, 26 Sep 2022 02:16:48 +0000 (12:16 +1000)]
gallivm: fix buffer_type for LLVM 15

Fixes
deqp-vk: /home/airlied/devel/llvm-project/llvm/include/llvm/IR/Instructions.h:961: static llvm::GetElementPtrInst* llvm::GetElementPtrInst::Create(llvm::Type*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&, llvm::Instruction*): Assertion `cast<PointerType>(Ptr->getType()->getScalarType()) ->isOpaqueOrPointeeTypeMatches(PointeeType)' failed.

Fixes: 1b8c4931df9d ("gallivm: fixes for LLVM-15 opaque pointers in lp_bld_jit_types.c")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18816>

21 months agogallivm: handle llvm coroutines for llvm > 15
Dave Airlie [Mon, 26 Sep 2022 01:37:05 +0000 (11:37 +1000)]
gallivm: handle llvm coroutines for llvm > 15

LLVM 15 changed the coroutine presplit function attribute in

735e6c40b5e9 [Coroutines] Convert coroutine.presplit to enum attr

This needed to be updated in mesa.

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

21 months agollvmpipe: bind sampler views/images properly.
Dave Airlie [Sun, 25 Sep 2022 22:44:56 +0000 (08:44 +1000)]
llvmpipe: bind sampler views/images properly.

There is some code that relies on TGSI here, and it has limits.
For now always just bind resources > 31.

Fixes
dEQP-VK.pipeline.pipeline_library.descriptor_limits*

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

21 months agollvmpipe: memset empty images in the key
Dave Airlie [Sun, 25 Sep 2022 21:10:22 +0000 (07:10 +1000)]
llvmpipe: memset empty images in the key

This fixes a bunch of valgrind warnings in
dEQP-VK.pipeline.pipeline_library.descriptor_limits.fragment_shader.storage_images_63

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

21 months agolavapipe: handle view mask layer count properly for begin rendering.
Dave Airlie [Sun, 25 Sep 2022 23:14:46 +0000 (09:14 +1000)]
lavapipe: handle view mask layer count properly for begin rendering.

If the view mask is set the layer count should be taken from it,
not from the layerCount.

Fixes: 8a6160a354282 ("lavapipe: VK_KHR_dynamic_rendering")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18811>

21 months agolavapipe: take layers into account around render surface creation.
Dave Airlie [Sun, 25 Sep 2022 23:13:37 +0000 (09:13 +1000)]
lavapipe: take layers into account around render surface creation.

This makes the code more consistent with handling layers, but also
makes sure a new surface is created when the w/h/layers changes.

Fixes: 8a6160a354282 ("lavapipe: VK_KHR_dynamic_rendering")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18811>

21 months agollvmpipe: handle different blocksizes for sampler/image views
Dave Airlie [Tue, 20 Sep 2022 06:35:05 +0000 (16:35 +1000)]
llvmpipe: handle different blocksizes for sampler/image views

In the cases where the sampler/image view format has a
different blocksize to the underlying resource, the width
/height need to be scaled.

Previous code to do this, did the rescaling before minification,
apparently scaling needs to happen after minification, this means
it has to happen in the llvm side.

This fixes a bunch of new VK CTS tests
dEQP-VK.image.texel_view_compatible.*

Reviewed-by: Brian Paul <brianp@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18767>

21 months agoradv: Use scalar layout for BDA references
Konstantin Seurer [Sat, 24 Sep 2022 17:08:49 +0000 (19:08 +0200)]
radv: Use scalar layout for BDA references

Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18794>