platform/upstream/mesa.git
3 years agointel/compiler: Make room for maximum dest size in nir_emit_texture.
Timur Kristóf [Tue, 16 Mar 2021 20:06:14 +0000 (21:06 +0100)]
intel/compiler: Make room for maximum dest size in nir_emit_texture.

The maximum dest_size is 5, not 4.

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

3 years agointel/compiler: Use assume() instead of assert() for array bounds.
Timur Kristóf [Tue, 16 Mar 2021 20:02:42 +0000 (21:02 +0100)]
intel/compiler: Use assume() instead of assert() for array bounds.

This should make both GCC and clang happy and make them believe that
the array bounds are not exceeded.

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

3 years agoCI: Change LAVA job visibility
Daniel Stone [Tue, 16 Mar 2021 20:31:08 +0000 (20:31 +0000)]
CI: Change LAVA job visibility

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

3 years agozink: enable PIPE_CAP_INVALIDATE_BUFFER
Mike Blumenkrantz [Tue, 27 Oct 2020 18:34:16 +0000 (14:34 -0400)]
zink: enable PIPE_CAP_INVALIDATE_BUFFER

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

3 years agozink: invalidate resources on map when discarding range
Mike Blumenkrantz [Tue, 27 Oct 2020 18:31:29 +0000 (14:31 -0400)]
zink: invalidate resources on map when discarding range

we can dump the whole vulkan object here for this case, which ends up being
much neater

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

3 years agozink: handle streamout buffer rebinds
Mike Blumenkrantz [Fri, 12 Mar 2021 22:42:28 +0000 (17:42 -0500)]
zink: handle streamout buffer rebinds

this really just means to nuke the counter buffer, and this can be done
by using a special bind_history bit that can be unset when the buffer has
been rebound

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

3 years agozink: set valid region for streamout buffers on bind
Mike Blumenkrantz [Fri, 12 Mar 2021 22:34:53 +0000 (17:34 -0500)]
zink: set valid region for streamout buffers on bind

this catches rebinds and is more accurate about the state of the region

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

3 years agozink: add a pipe_context::invalidate_resource hook
Mike Blumenkrantz [Tue, 27 Oct 2020 18:30:20 +0000 (14:30 -0400)]
zink: add a pipe_context::invalidate_resource hook

this creates new backing objects for the invalidated resource and, if
needed, rebinds it to any descriptor sets it might be used in by invalidating
the descriptor state and creating new view objects

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

3 years agozink: remove direct samplerview batch-tracking
Mike Blumenkrantz [Tue, 16 Mar 2021 17:54:21 +0000 (13:54 -0400)]
zink: remove direct samplerview batch-tracking

this moves tracking onto the surface/bufferview, which is more accurate
and allows the removal of a temporary hack in resource invalidation

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

3 years agozink: hook up resource bind history
Mike Blumenkrantz [Tue, 27 Oct 2020 16:44:58 +0000 (12:44 -0400)]
zink: hook up resource bind history

seems like this should be a gallium thing with how many drivers copy/paste it

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

3 years agoci/panfrost: disable the rest of these jobs temporarily
Mike Blumenkrantz [Tue, 16 Mar 2021 22:47:59 +0000 (18:47 -0400)]
ci/panfrost: disable the rest of these jobs temporarily

runners having a hard time right now

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9639>

3 years agozink: ci updates
Mike Blumenkrantz [Tue, 16 Mar 2021 15:51:50 +0000 (11:51 -0400)]
zink: ci updates

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

3 years agozink: set ntv variable descriptor sets during compile phase
Mike Blumenkrantz [Mon, 22 Feb 2021 14:34:56 +0000 (09:34 -0500)]
zink: set ntv variable descriptor sets during compile phase

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

3 years agozink: apply Delete All The Code methodology to the ubo/ssbo variables
Mike Blumenkrantz [Fri, 4 Dec 2020 20:43:19 +0000 (15:43 -0500)]
zink: apply Delete All The Code methodology to the ubo/ssbo variables

gallium rewrites all the ubo/ssbo instructions to use the buffer index as
the instruction src. the nir variables which are passed to zink after that
point are completely worthless, and it's impossible to accurately determine
which one corresponds to which buffer

thus, deleting all the variables and creating new ones based on the buffers
that are used is the best option, and it also enables simplifying a ton
of code as well as doing even better improvements in the future

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

3 years agozink: move zink_binding() to compiler.c
Mike Blumenkrantz [Fri, 1 Jan 2021 16:32:42 +0000 (11:32 -0500)]
zink: move zink_binding() to compiler.c

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

3 years agozink: directly set nir variable bindings for reuse during ntv
Mike Blumenkrantz [Thu, 31 Dec 2020 17:56:04 +0000 (12:56 -0500)]
zink: directly set nir variable bindings for reuse during ntv

this lets us prepopulate the binding values without "fetching" them
twice

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

3 years agozink: flatten binding numbers a bit
Mike Blumenkrantz [Fri, 4 Dec 2020 20:42:29 +0000 (15:42 -0500)]
zink: flatten binding numbers a bit

now that descriptor types are split, we can just use the type-max values
per stage as the increment instead of all type max values

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

3 years agozink: break out sized uint array construction into util function
Mike Blumenkrantz [Fri, 4 Dec 2020 17:17:13 +0000 (12:17 -0500)]
zink: break out sized uint array construction into util function

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

3 years agozink: add ntv util function for checking if a glsl type is an atomic counter
Mike Blumenkrantz [Fri, 4 Dec 2020 17:14:10 +0000 (12:14 -0500)]
zink: add ntv util function for checking if a glsl type is an atomic counter

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

3 years agozink: add debug info about missing atomic ops
Mike Blumenkrantz [Fri, 4 Dec 2020 17:13:32 +0000 (12:13 -0500)]
zink: add debug info about missing atomic ops

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

3 years agozink: add unsized array type to get_glsl_type_element() handling
Mike Blumenkrantz [Wed, 2 Dec 2020 19:37:31 +0000 (14:37 -0500)]
zink: add unsized array type to get_glsl_type_element() handling

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

3 years agozink: also break out whole ntv bo struct pointer construction
Mike Blumenkrantz [Wed, 2 Dec 2020 17:39:46 +0000 (12:39 -0500)]
zink: also break out whole ntv bo struct pointer construction

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

3 years agozink: break out bo array type construction into ntv util function
Mike Blumenkrantz [Wed, 2 Dec 2020 17:36:07 +0000 (12:36 -0500)]
zink: break out bo array type construction into ntv util function

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

3 years agozink: use intermediate var for glsl non-array type during shader create
Mike Blumenkrantz [Tue, 1 Dec 2020 18:48:17 +0000 (13:48 -0500)]
zink: use intermediate var for glsl non-array type during shader create

minor readability change

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

3 years agozink: run nir_convert_from_ssa last during compile
Mike Blumenkrantz [Tue, 29 Dec 2020 16:31:35 +0000 (11:31 -0500)]
zink: run nir_convert_from_ssa last during compile

running this too early breaks other passes

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

3 years agoturnip: Enable nonuniform descriptor indexing
Hyunjun Ko [Tue, 16 Mar 2021 06:24:06 +0000 (06:24 +0000)]
turnip: Enable nonuniform descriptor indexing

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125>

3 years agoir3: Add nonuniform encodings to ir3 encoder and parser
Hyunjun Ko [Tue, 9 Mar 2021 05:57:53 +0000 (05:57 +0000)]
ir3: Add nonuniform encodings to ir3 encoder and parser

By keeping track of nonuniform access from nir and storing it to ir3.

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125>

3 years agoir3: fix has_src() to return correctly in ir3_nir_lower_tex_prefetch
Hyunjun Ko [Tue, 9 Mar 2021 05:47:21 +0000 (05:47 +0000)]
ir3: fix has_src() to return correctly in ir3_nir_lower_tex_prefetch

This seems to be originally introduced from 2a0d45ae6c, and 562aaea07c
misused the method.

Fixes: 2a0d45ae6c "freedreno/ir3: Add a NIR pass to select tex instructions eligible for pre-fetch"
Fixes: 562aaea07c "freedreno/ir3: respect tex prefetch limits"

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125>

3 years agonir: Set access at lower_ubo_vec4
Hyunjun Ko [Tue, 16 Mar 2021 06:21:52 +0000 (06:21 +0000)]
nir: Set access at lower_ubo_vec4

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125>

3 years agoturnip: Return correct value of tu6_load_state_size
Hyunjun Ko [Tue, 16 Feb 2021 07:44:43 +0000 (07:44 +0000)]
turnip: Return correct value of tu6_load_state_size

The state of active_desc_sets in pipeline should be set before
allocation of the pipeline so we get correct size of descriptor
sets and reserve enough space upfront.

Otherwise we might hit assert(pipeline->cs.bo_count == 1).

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Reviewed-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9125>

3 years agoac/llvm: handle demote in LLVM 13 that just added support for it
Marek Olšák [Tue, 2 Mar 2021 10:07:12 +0000 (05:07 -0500)]
ac/llvm: handle demote in LLVM 13 that just added support for it

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9362>

3 years agoutil/disk_cache: add cache item headers to single file cache entries
Timothy Arceri [Sat, 6 Mar 2021 03:49:31 +0000 (14:49 +1100)]
util/disk_cache: add cache item headers to single file cache entries

I mistakenly left these out of the original single file cache
implementation.

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

3 years agoutil/disk_cache: detangle cache item creation from disk writing
Timothy Arceri [Sat, 6 Mar 2021 02:35:07 +0000 (13:35 +1100)]
util/disk_cache: detangle cache item creation from disk writing

This refactors the cache code so that we create the full cache
item in memory before writing it to disk. The result is slightly
cleaner code and the ability to share this code between the single
and multi file cache implementations.

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

3 years agoutil/disk_cache: separate file reads from cache item validation
Timothy Arceri [Wed, 3 Mar 2021 04:12:09 +0000 (15:12 +1100)]
util/disk_cache: separate file reads from cache item validation

This will allow us to share validation between the single file cache
and the multifile cache.

It also reduces the number of malloc() calls.

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

3 years agoutil/compress: make compression function inputs const
Timothy Arceri [Mon, 15 Mar 2021 05:06:08 +0000 (16:06 +1100)]
util/compress: make compression function inputs const

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

3 years agolavapipe: add support for KHR_buffer_device_address.
Dave Airlie [Tue, 16 Mar 2021 01:15:47 +0000 (11:15 +1000)]
lavapipe: add support for KHR_buffer_device_address.

Adds the missing magic lowering pass, and stores the pmem
pointer for easier returning to user.

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

3 years agolavapipe: only init immutable samplers for correct types.
Dave Airlie [Tue, 16 Mar 2021 01:14:55 +0000 (11:14 +1000)]
lavapipe: only init immutable samplers for correct types.

This is ported from anv, and it needed to stop crashes with
the buffer_device_address CTS tests

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

3 years agogallivm: convert packing to uint64 not double
Dave Airlie [Tue, 16 Mar 2021 01:14:15 +0000 (11:14 +1000)]
gallivm: convert packing to uint64 not double

Fixes some issues with later inttopotr casting.

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

3 years agoir3: fix oob access to regs array for getbuf,getinfo,rgetinfo
Danylo Piliaiev [Mon, 15 Mar 2021 18:32:52 +0000 (20:32 +0200)]
ir3: fix oob access to regs array for getbuf,getinfo,rgetinfo

Since they have zero source registers, src->regs[1] is out of bounds.
It probably wasn't able to cause any harm, but it's always better
be safe.

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

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9609>

3 years agoci/freedreno: run freedreno jobs on any change in src/freedreno/
Danylo Piliaiev [Tue, 16 Mar 2021 09:26:20 +0000 (11:26 +0200)]
ci/freedreno: run freedreno jobs on any change in src/freedreno/

Without a way to exclude specific subdirectories, keeping the list
of all subdirectories which need to be tested is error prone.
It's better to run CI slightly more often than to miss it when
it is needed.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9609>

3 years agoci/freedreno: Switch the piglit testing to the new piglit runner.
Eric Anholt [Wed, 3 Mar 2021 23:42:57 +0000 (15:42 -0800)]
ci/freedreno: Switch the piglit testing to the new piglit runner.

Getting piglit to fit onto our test devices was proving difficult, and we
need the ability to handle flakes, so switch to the rust piglit runner
that @pepp wrote as part of the deqp-runner repo which gives us flake
detection, sharding across boards, fractional runs, and almost half the
runtime.

It doesn't handle piglit subtests yet, but if you can't run piglit's
python on your devices because it's too bloated and unstable, this is a
way forward.

Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9468>

3 years agoci: Bump deqp-runner to v0.6.3.
Eric Anholt [Sat, 6 Mar 2021 00:20:48 +0000 (16:20 -0800)]
ci: Bump deqp-runner to v0.6.3.

This adds a piglit runner that we'll be using on freedreno, better
xfail/unexpectedpass handling for some cases (Missing->Pass, Warn->Warn),
better error logging for the Missing issue we've had in CI, a fix for a
source of Missing, and a pile more unit tests.

As a result, we now catch that the Missing results for a bunch of our
tests have gone away.

Reviewed-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9468>

3 years agoaco: Use ASSERTED to avoid unused variable warning.
Timur Kristóf [Tue, 16 Mar 2021 19:10:51 +0000 (20:10 +0100)]
aco: Use ASSERTED to avoid unused variable warning.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9632>

3 years agopan/bi: Use correct enum type for NIR intrinsics.
Timur Kristóf [Tue, 16 Mar 2021 19:09:12 +0000 (20:09 +0100)]
pan/bi: Use correct enum type for NIR intrinsics.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9632>

3 years agoci/panfrost: Disable t860/radeonsi testing while the runners are struggling.
Eric Anholt [Tue, 16 Mar 2021 21:09:04 +0000 (14:09 -0700)]
ci/panfrost: Disable t860/radeonsi testing while the runners are struggling.

These jobs keep getting stuck, so disable for now.  Info on what is going
on is at
https://gitlab.freedesktop.org/mesa/mesa/-/issues/3437#note_841920 (the
grunt and stoney runners are maybe still operational at the moment)

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

3 years agozink: unset last_vertex_stage_dirty after applying it
Mike Blumenkrantz [Tue, 16 Mar 2021 19:57:52 +0000 (15:57 -0400)]
zink: unset last_vertex_stage_dirty after applying it

turns out that having extra flags for stuff isn't that useful if you never reset them

Fixes: 9b8c121917d ("zink: flag shaders as needing update when clip_halfz changes")

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9633>

3 years agolavapipe: fix primitive-restart for uint8 indices
Erik Faye-Lund [Tue, 16 Mar 2021 15:00:33 +0000 (16:00 +0100)]
lavapipe: fix primitive-restart for uint8 indices

I forgot to add an implicit primitive-restart index for uint8 while
adding support for this initially. But we also have a nice little
helper to simplify this, so let's use that instead of open-coding.

Fixes: 6526e6d11b8 ("lavapipe: implement VK_EXT_index_type_uint8")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9622>

3 years agozink: add missing null check
Mike Blumenkrantz [Tue, 16 Mar 2021 15:10:09 +0000 (11:10 -0400)]
zink: add missing null check

mismerged from an earlier patch...

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9623>

3 years agoCI: Trigger Windows builds for llvmpipe & Vulkan changes
Daniel Stone [Thu, 11 Mar 2021 11:48:59 +0000 (11:48 +0000)]
CI: Trigger Windows builds for llvmpipe & Vulkan changes

As Windows now builds llvmpipe and lavapipe, we should be sure to run
their builds when these change.

Acked-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9518>

3 years agofreedreno: Fix fd_fence_finish()
Rob Clark [Tue, 16 Mar 2021 15:49:09 +0000 (08:49 -0700)]
freedreno: Fix fd_fence_finish()

fd_fence_create_unflushed() is called with the driver context, but
fd_fence_finish() is called with the threaded/frontend context, which
is what threaded_context_flush() expects to be passed.

Fixes: c4e5beef076 ("freedreno: threaded_context async flush support")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9627>

3 years agointel: Simplify few version checks involving G4X
Anuj Phogat [Mon, 15 Mar 2021 18:58:07 +0000 (11:58 -0700)]
intel: Simplify few version checks involving G4X

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9608>

3 years agointel: Remove GEN_IS_G4X macro
Anuj Phogat [Thu, 4 Mar 2021 23:30:41 +0000 (15:30 -0800)]
intel: Remove GEN_IS_G4X macro

GEN_GEN and GEN_VERSIONx10 macros provide a consistent way to do platform
version checks. We can avoid platform specific macros.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9608>

3 years agointel: Simplify version checks involving haswell
Anuj Phogat [Tue, 9 Mar 2021 22:27:06 +0000 (14:27 -0800)]
intel: Simplify version checks involving haswell

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9608>

3 years agointel: Remove GEN_IS_HASWELL macro
Anuj Phogat [Thu, 4 Mar 2021 23:09:42 +0000 (15:09 -0800)]
intel: Remove GEN_IS_HASWELL macro

Use GEN_VERSIONx10 == 75 check in place of GEN_IS_HASWELL macro.
GEN_GEN and GEN_VERSIONx10 macros provide a consistent way to do platform
version checks. We can avoid platform specific macros.

Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9608>

3 years agofreedreno/a5xx: Fix the max texture buffer size.
Eric Anholt [Tue, 16 Mar 2021 03:28:11 +0000 (20:28 -0700)]
freedreno/a5xx: Fix the max texture buffer size.

The GLES minmax is 65536.  The blob vulkan exposes 65536 on both a5xx and
a6xx, but try just doing the same as we do for a6xx.

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

3 years agofreedreno/a5xx: Fix the texel buffer alignment requirement.
Eric Anholt [Tue, 16 Mar 2021 00:26:30 +0000 (17:26 -0700)]
freedreno/a5xx: Fix the texel buffer alignment requirement.

Info comes from the a540 vulkan blob driver minTexelBufferOffsetAlignment.

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

3 years agoci: Run meson tests in strace if it's available and can be used
Michel Dänzer [Thu, 4 Mar 2021 11:58:56 +0000 (12:58 +0100)]
ci: Run meson tests in strace if it's available and can be used

Keep the strace logs in job artifacts for tests which timed out.

This can be useful for figuring out why a timeout occurred.

strace cannot be used in jobs where ASAN is enabled, because ASAN's
leak checker also uses ptrace(), which isn't possible within strace.

Suggested-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9472>

3 years agoci: Add strace to the x86_build docker image
Michel Dänzer [Thu, 4 Mar 2021 11:37:56 +0000 (12:37 +0100)]
ci: Add strace to the x86_build docker image

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

3 years agoaco/tests: Use _exit in child process
Michel Dänzer [Tue, 9 Mar 2021 10:53:09 +0000 (11:53 +0100)]
aco/tests: Use _exit in child process

Since the child process doesn't call exec(), exit() attempted to run
atexit handlers registered by the parent process. This could result in
the child process hanging in exit() if there were still disk cache
threads alive when the parent process called fork(). (The CI runners
hit this multiple times when running tests in strace)

Fixes: 6a246f5c6d51 "aco/tests: Fix deadlock for too large test lists"
Reviewed-by: Tony Wasserka <tony.wasserka@gmx.de>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9472>

3 years agoci: Move /usr/bin/time check from meson test wrapper to build script
Michel Dänzer [Mon, 8 Mar 2021 17:20:06 +0000 (18:20 +0100)]
ci: Move /usr/bin/time check from meson test wrapper to build script

In jobs where the wrapper isn't used, this leaves the
<build directory>/meson-logs/testlog.txt filename unchanged.

Also prepares for using different wrapper scripts in different jobs.

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

3 years agoci: Drop SIGINT handling from meson test wrapper script
Michel Dänzer [Thu, 4 Mar 2021 17:14:03 +0000 (18:14 +0100)]
ci: Drop SIGINT handling from meson test wrapper script

Not needed, I had misread meson code.

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

3 years agoci: Move meson-build.sh to meson/build.sh
Michel Dänzer [Mon, 8 Mar 2021 17:11:27 +0000 (18:11 +0100)]
ci: Move meson-build.sh to meson/build.sh

A little less clutter in the top .gitlab-ci directory.

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

3 years agod3d12: Really handle null constant buffers
Jesse Natalie [Mon, 1 Mar 2021 21:46:55 +0000 (13:46 -0800)]
d3d12: Really handle null constant buffers

Previous attempt was checking the wrong pointer...

Fixes: eb27db86 ("d3d12: Handle null constant buffers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4362
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9349>

3 years agod3d12: Handle is_new_style_shadow comparison filtering
Jesse Natalie [Mon, 1 Mar 2021 21:42:21 +0000 (13:42 -0800)]
d3d12: Handle is_new_style_shadow comparison filtering

Note: the tex instruction is modified in place, so the correct
number of expected result components needs to be cached before
the shadow state is modified

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9349>

3 years agod3d12: Move descriptor pools to screen, and add lock
Jesse Natalie [Mon, 1 Mar 2021 21:31:26 +0000 (13:31 -0800)]
d3d12: Move descriptor pools to screen, and add lock

Surfaces can be shared across contexts, and can even outlive the
original context that created them, so move the pools to the screen.
Since they no longer belong to a single context, they need a lock now.

v2: Samplers moved back to the context
v3: Fix Linux build

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3812
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9349>

3 years agovulkan: add missing vk_shader_module.c/h includes to Makefile
Samuel Pitoiset [Tue, 16 Mar 2021 13:57:10 +0000 (14:57 +0100)]
vulkan: add missing vk_shader_module.c/h includes to Makefile

Fixes: 76078ed9fe3 ("vk/util: add unified shader module struct/functions")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9620>

3 years agozink: cache bufferviews
Mike Blumenkrantz [Tue, 27 Oct 2020 14:40:27 +0000 (10:40 -0400)]
zink: cache bufferviews

we can cache bufferviews just like we do surfaces, so let's do that

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

3 years agozink: properly handle null bufferview descriptor states
Mike Blumenkrantz [Thu, 5 Nov 2020 15:44:03 +0000 (10:44 -0500)]
zink: properly handle null bufferview descriptor states

now that we have this state properly stored we can use it for more accurate
hashing and caching

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

3 years agozink: improve debug asserts for samplers/images during descriptor updates
Mike Blumenkrantz [Thu, 5 Nov 2020 15:41:21 +0000 (10:41 -0500)]
zink: improve debug asserts for samplers/images during descriptor updates

these are now more accurate for null bufferviews/imageviews

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

3 years agozink: update null descriptor hashes to reflect current descriptor states
Mike Blumenkrantz [Thu, 5 Nov 2020 15:39:19 +0000 (10:39 -0500)]
zink: update null descriptor hashes to reflect current descriptor states

also add a bufferview hash since we use these now

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

3 years agozink: add helper function for getting a resource for a descriptor
Mike Blumenkrantz [Tue, 27 Oct 2020 17:32:34 +0000 (13:32 -0400)]
zink: add helper function for getting a resource for a descriptor

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

3 years agozink: massively beef up batch tracking for shader images
Mike Blumenkrantz [Wed, 28 Oct 2020 00:41:15 +0000 (20:41 -0400)]
zink: massively beef up batch tracking for shader images

the struct for these isn't allocated, so we need to ensure that the objects
in it are explicitly tracked on batches when they're used

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

3 years agozink: add extra batch tracking for sampler views
Mike Blumenkrantz [Wed, 28 Oct 2020 00:25:06 +0000 (20:25 -0400)]
zink: add extra batch tracking for sampler views

we're going to start invalidating and rebinding resources, which means
we need to be extra sure that we have our lifetimes in order here

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

3 years agozink: simplify bufferview and imageview descriptor state hashing
Mike Blumenkrantz [Thu, 5 Nov 2020 15:28:32 +0000 (10:28 -0500)]
zink: simplify bufferview and imageview descriptor state hashing

now that we have the hash for the internal objects available at all times, we
can directly reuse this instead of computing it each time, giving us more
accurate hashes as well as saving us cpu cycles

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

3 years agozink: store bufferview hash to bufferview struct
Mike Blumenkrantz [Thu, 5 Nov 2020 15:27:08 +0000 (10:27 -0500)]
zink: store bufferview hash to bufferview struct

this lets us do a lot of things more precisely for bufferviews

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

3 years agozink: explicitly use zink_surface objects for sampler/image view objects
Mike Blumenkrantz [Thu, 5 Nov 2020 15:24:53 +0000 (10:24 -0500)]
zink: explicitly use zink_surface objects for sampler/image view objects

we can reuse this codepath instead of NIHing it

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

3 years agozink: use an explicit zink_buffer_view struct
Mike Blumenkrantz [Thu, 5 Nov 2020 15:21:05 +0000 (10:21 -0500)]
zink: use an explicit zink_buffer_view struct

this gives us an object to work with similar to zink_surface

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

3 years agozink: add util function for checking whether shader descriptor is buffer from program
Mike Blumenkrantz [Fri, 30 Oct 2020 12:18:09 +0000 (08:18 -0400)]
zink: add util function for checking whether shader descriptor is buffer from program

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

3 years agozink: add util function for checking whether a shader descriptor is a buffer
Mike Blumenkrantz [Fri, 30 Oct 2020 12:17:07 +0000 (08:17 -0400)]
zink: add util function for checking whether a shader descriptor is a buffer

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

3 years agozink: add some asserts for pipeline barriers to check renderpass state
Mike Blumenkrantz [Tue, 13 Oct 2020 14:12:40 +0000 (10:12 -0400)]
zink: add some asserts for pipeline barriers to check renderpass state

it's illegal to emit barriers during a renderpass

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

3 years agozink: handle cached descriptor set punting
Mike Blumenkrantz [Tue, 16 Mar 2021 04:34:31 +0000 (00:34 -0400)]
zink: handle cached descriptor set punting

if an active set gets invalidated, it needs to be punted from the active
hash table so it doesn't get reused

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

3 years agoCI: Try really hard to get updated Windows TLS certs
Daniel Stone [Mon, 15 Mar 2021 20:41:30 +0000 (20:41 +0000)]
CI: Try really hard to get updated Windows TLS certs

Windows doesn't actually distribute a full TLS CA certificate store, but
pulls them in over time with Windows Update. Try to prime it by manually
pulling the certificates and installing them.

This bumps the Windows tag to force a rebuild.

Acked-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9618>

3 years agozink: track resource_object usage instead of resource usage
Mike Blumenkrantz [Tue, 27 Oct 2020 16:07:36 +0000 (12:07 -0400)]
zink: track resource_object usage instead of resource usage

the resource object is now a state tracker for the inner resource_object,
so it can safely be destroyed even if the backing resource is still in use

this also requires updating various things to keep descriptor states/caches working

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

3 years agozink: split out backing resource object create/destroy
Mike Blumenkrantz [Tue, 27 Oct 2020 15:59:33 +0000 (11:59 -0400)]
zink: split out backing resource object create/destroy

moving towards these being able to exist semi-independently...

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

3 years agozink: move resource internals to a separate struct
Mike Blumenkrantz [Tue, 27 Oct 2020 15:38:16 +0000 (11:38 -0400)]
zink: move resource internals to a separate struct

this starts the path towards being able to replace the backing objects for
a resource

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

3 years agozink: break out batch id finding for resource usage into util function
Mike Blumenkrantz [Thu, 8 Oct 2020 18:16:40 +0000 (14:16 -0400)]
zink: break out batch id finding for resource usage into util function

this is generally helpful for figuring out the last batch a resource was
used for

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

3 years agozink: avoid looping for non-ubo descriptor updates based on set usage
Mike Blumenkrantz [Tue, 13 Oct 2020 17:45:50 +0000 (13:45 -0400)]
zink: avoid looping for non-ubo descriptor updates based on set usage

if we know that the descriptor set is cached and already in use by a given
batch, then we also know that all the resources in the set are tracked, which
means that we can skip over some looping  during descriptor updates which would
otherwise be used to add tracking for sampler/image views/states

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

3 years agozink: add batch usage flags for sampler views/states and desc sets
Mike Blumenkrantz [Tue, 13 Oct 2020 12:12:59 +0000 (08:12 -0400)]
zink: add batch usage flags for sampler views/states and desc sets

this massively cuts down cpu time for hashing and lookups, resulting in
a noticeable performance increase

the sampler_state batch usage for now is just being set for future use when
it will be leveraged to permit immediate deletion

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

3 years agoradv: Use correct DCC compressed block size for sampling.
Bas Nieuwenhuizen [Mon, 15 Mar 2021 21:15:39 +0000 (22:15 +0100)]
radv: Use correct DCC compressed block size for sampling.

Don't need to change the pre-GFX9 samplers because this option doesn't
vary there.

Fixes: f848f2adfae ("radv: Use ac_surface DCC settings for shareable images.")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4455
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4425
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9611>

3 years agogenxml: Make 1-bit L3$ config register fields bool on Gen7
Jason Ekstrand [Mon, 15 Mar 2021 23:39:19 +0000 (18:39 -0500)]
genxml: Make 1-bit L3$ config register fields bool on Gen7

Otherwise, they look like booleans but, if you put a value other than
0/1 in them, the GenXML generator code will explode.

Fixes: b6875b0094c "anv: Drop has_slm in emit_l3_config for gen11+"
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9614>

3 years agoturnip: implement intrinsic_vulkan_resource_reindex
Danylo Piliaiev [Wed, 10 Mar 2021 12:29:31 +0000 (14:29 +0200)]
turnip: implement intrinsic_vulkan_resource_reindex

Descriptor arrays are continuous, so it's just an addition of offset.

Fixes test:
 dEQP-VK.spirv_assembly.instruction.compute.variable_pointers.dynamic_offset.select_descriptor_array

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9495>

3 years agoci/freedreno: Add three more a5xx flakes from the last day.
Eric Anholt [Thu, 11 Mar 2021 19:47:54 +0000 (11:47 -0800)]
ci/freedreno: Add three more a5xx flakes from the last day.

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

3 years agoandroid: i965: Rename files with "intel_" prefix to "brw_"
Mauro Rossi [Fri, 12 Mar 2021 23:08:37 +0000 (00:08 +0100)]
android: i965: Rename files with "intel_" prefix to "brw_"

The necessary changes for Android build were missing in Makefile.sources

Fixes: 9d95e1bd79a8 (i965: Rename files with "intel_" prefix to "brw_")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9576>

3 years agoanv: use common interfaces for shader modules
Mike Blumenkrantz [Wed, 10 Mar 2021 22:50:15 +0000 (17:50 -0500)]
anv: use common interfaces for shader modules

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

3 years agotu: use common interfaces for shader modules
Mike Blumenkrantz [Wed, 10 Mar 2021 22:50:15 +0000 (17:50 -0500)]
tu: use common interfaces for shader modules

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9508>

3 years agov3dv: use common interfaces for shader modules
Mike Blumenkrantz [Wed, 10 Mar 2021 22:50:00 +0000 (17:50 -0500)]
v3dv: use common interfaces for shader modules

squashed changes from Alejandro Piñeiro <apinheiro@igalia.com>:

Add call to vk_object_base_init on internal shader_module: we have
some cases where internally we have some shader modules that we don't
create through CreateShaderModule, so in this case we need to manually
call base_init. Not sure why this wasn't needed before.

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

3 years agoradv: use common interfaces for shader modules
Mike Blumenkrantz [Wed, 10 Mar 2021 22:49:46 +0000 (17:49 -0500)]
radv: use common interfaces for shader modules

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

3 years agolavapipe: use common interfaces for shader modules
Mike Blumenkrantz [Wed, 10 Mar 2021 22:49:28 +0000 (17:49 -0500)]
lavapipe: use common interfaces for shader modules

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

3 years agovk/util: add a util macro for initializing stack vk_shader_module structs
Mike Blumenkrantz [Fri, 12 Mar 2021 12:30:39 +0000 (07:30 -0500)]
vk/util: add a util macro for initializing stack vk_shader_module structs

radv does a lot of this, so having a central dispatch point will be useful in
case changes are made to this struct in the future

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

3 years agovk/util: add unified shader module struct/functions
Mike Blumenkrantz [Wed, 10 Mar 2021 22:48:30 +0000 (17:48 -0500)]
vk/util: add unified shader module struct/functions

there's some extra logging stuff dumped into here to match functionality,
eventually that should also be consolidated into vk_util.c

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