Mike Blumenkrantz
86b24fba05
zink: align pipe_resource and sampler_view allocations to cachelines
...
this eliminates false sharing for atomics
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13431 >
2021-10-19 02:40:37 +00:00
Mike Blumenkrantz
89ed9ed400
zink: don't ralloc zink_resource structs
...
the hash tables can just have their own contexts and be freed explicitly
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13431 >
2021-10-19 02:40:37 +00:00
Mike Blumenkrantz
4cad3da409
lavapipe: clamp attachment clear rect sizes
...
this is a spec violation, but crashing isn't cool, so do a little clamping
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
67dd6b9f0f
lavapipe: pull layer count from render state during resolve
...
vk_framebuffer may be null
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
f25a98318b
lavapipe: remove lvp_subpass::has_color_att
...
unused
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
f7e9500dc2
lavapipe: simplify some attachment derefs
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
d914df72ab
lavapipe: store subpass directly to rendering_state
...
this is fewer array derefs
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
a0c81efcf4
lavapipe: remove last VK_ATTACHMENT_UNUSED check
...
these are all just null checks now
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
58e18a2be9
lavapipe: remove lvp_subpass_attachment and use lvp_render_pass_attachment refs
...
this is one fewer indirect reference that allows removing a bunch of stuff from
renderpass creation
now also unused subpass attachments are just NULL pointers, making detection simpler
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
5e3bc8b18d
lavapipe: remove lvp_subpass::max_sample_count
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
5e3d84e30a
lavapipe: add attachment index to lvp_render_pass_attachment
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
5cf568ce09
lavapipe: remove lvp_subpass_attachment::layout
...
unused
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
eaa82252f9
lavapipe: remove lvp_subpass_attachment::in_render_loop
...
this isn't used
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
afd8820d66
lavapipe: use framebuffer attachment_count member instead of renderpass
...
according to spec, these must be equal
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
dd70ff3b8c
lavapipe: remove some unused struct members
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Mike Blumenkrantz
d103d5bb5d
lavapipe: stop reading renderpass during pipeline creation
...
this is unnecessary and is going to be annoying in the future
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13349 >
2021-10-19 01:18:24 +00:00
Dave Airlie
cae1ef0a11
clover: use max shader sampler view/images queries for clover.
...
This is probably sane than my last answer to this question
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13398 >
2021-10-19 01:03:58 +00:00
Mike Blumenkrantz
dfd0f5dbfd
zink: move last of lazy descriptor state updating back to lazy-only code
...
hybrid mode is controlled by the caching manager, so state tracking is irrelevant
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350 >
2021-10-19 00:51:50 +00:00
Mike Blumenkrantz
140d3ea8c6
zink: add an early return for zink_descriptors_update_lazy_masked()
...
no point in generating pools/sets that won't be used here
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350 >
2021-10-19 00:51:50 +00:00
Mike Blumenkrantz
7c840f5103
zink: move push descriptor updating into lazy-only codepath
...
this was a bit confusing to read, and I originally left it in the hybrid
path to enable fallbacks to push descriptors in hybrid mode. the problem with
that idea is that it's impossible: the constant buffer set is the one set
that will never, ever trigger a fallback, so leaving it there just leaves
room for error and confusion
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350 >
2021-10-19 00:51:50 +00:00
Mike Blumenkrantz
b140d58b1f
zink: don't update lazy descriptor states in hybrid mode
...
I'm not 100% sure how, but this breaks tomb raider
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350 >
2021-10-19 00:51:50 +00:00
Mike Blumenkrantz
75e51138b1
zink: assert compute descriptor key is valid before hashing it
...
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350 >
2021-10-19 00:51:50 +00:00
Mike Blumenkrantz
497ce3c38a
zink: clear descriptor refs on buffer replacement
...
the bo here can only ever be destroyed before it gets reused, so prune
it from the descriptor cache immediately
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13350 >
2021-10-19 00:51:50 +00:00
Mike Blumenkrantz
e66558985a
zink: fully zero surface creation struct
...
gotta get those holes for caching
cc: mesa-stable
Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13410 >
2021-10-19 00:33:50 +00:00
Mike Blumenkrantz
a2789fde0c
zink: add a read barrier for indirect dispatch
...
using the draw stage here doesn't make much sense, but that's what the
spec says, so let's git er done
fixes dEQP-GL45.functional.compute.indirect_dispatch* on radv
Cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13381 >
2021-10-19 00:17:00 +00:00
Mike Blumenkrantz
11dd9e4ee4
zink: use static array for detecting VK_TIME_DOMAIN_DEVICE_EXT
...
there's only a few possible values for this, so just use a static array
to avoid leaking
Fixes: 039078fe97 ("zink: slight refactor of load_device_extensions()")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13360 >
2021-10-19 00:02:39 +00:00
Neha Bhende
061610a7dd
st: Fix comments in commit be6d584de4
...
This patch is adding comments as suggested by Ilia in MR
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13423 >
2021-10-18 21:30:03 +00:00
Karol Herbst
753f595e3d
clover/api: fix clGetMemObjectInfo for images
...
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13424 >
2021-10-19 06:55:38 +10:00
Karol Herbst
b4f9b15dd0
clover/formats: pass in cl_mem_flags for better format checking
...
This allows us to advertise more formats depending on how the image is
getting used inside a kernel.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13424 >
2021-10-19 06:55:34 +10:00
Karol Herbst
f09e6c1c5f
clover/format: Full rework on how we declare supported images.
...
While at it also remove CL_LUMINANCE and CL_INTENSITY, which are optional
but also quite broken.
Also advertize all formats we can already support and make the list easier
to read. Also adds support for newer formats.
v2: fixup packing for non-8 bits (airlied)
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13424 >
2021-10-19 06:55:22 +10:00
Neha Bhende
be6d584de4
st: Fix 64-bit vertex attrib index for TGSI path
...
Patch 77c2b022a0 removed lowering of 64-bit vertex attribs to 32bits.
This has thrown TGSI translation off the guard for 64bit attrib.
This lead to fail/crash of 1000+ piglit tests.
This patch basically fixes 64 bit attrib index for TGSI shader by adding placeholder
for second part of a double attribute.
It fixes all regressed piglit tests.
A big help from Charmaine to fix this regression
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Fixes: 77c2b022a0 ("st/mesa: remove lowering of 64-bit vertex attribs to 32 bits")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13363 >
2021-10-18 19:02:55 +00:00
Marek Olšák
e65d6f45d2
radeonsi: reorder and don't print patch level DRM version in the renderer string
...
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13392 >
2021-10-18 18:37:09 +00:00
Marek Olšák
f9d7db0262
ac,radeonsi: print a lowercase codename in the renderer string
...
to make it stand out less
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13392 >
2021-10-18 18:37:09 +00:00
Marek Olšák
cbcdcd42fc
radeonsi: enable shader culling on Navi1x consumer SKUs as well
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13393 >
2021-10-18 18:08:59 +00:00
Marek Olšák
8cf802e8ef
radeonsi: replace the GS prolog with a monolithic shader variant
...
It only exists because of the hw bug and is used very rarely.
Let's simplify it.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13393 >
2021-10-18 18:08:59 +00:00
Marek Olšák
62798d2c1f
radeonsi: don't pass NULL into si_get_nir_shader
...
so that we always have the shader key there
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13393 >
2021-10-18 18:08:59 +00:00
Danylo Piliaiev
3350957f3c
drirc: Apply vk_dont_care_as_load workaround to Forsaken Remastered
...
Game has one renderpass which loads attachment with DONT_CARE, does
nothing, and writes it back.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5437
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13367 >
2021-10-18 17:26:41 +00:00
Danylo Piliaiev
ebca227db1
turnip: implement vk_dont_care_as_load workaround
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13367 >
2021-10-18 17:26:41 +00:00
Danylo Piliaiev
3d69800a0b
driconf: add vk_dont_care_as_load workaround option
...
It's easy to make a mistake of using VK_ATTACHMENT_LOAD_OP_DONT_CARE
when LOAD_OP_LOAD should be used since all desktop GPUs do the same
thing (nothing) for both of them.
However tiler GPUs do actually care about them.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13367 >
2021-10-18 17:26:41 +00:00
Danylo Piliaiev
fd31989ecb
turnip: add support for dirconf
...
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13367 >
2021-10-18 17:26:41 +00:00
Samuel Pitoiset
5b797bd485
radv: fix OpImageQuerySamples with non-zero descriptor set
...
The descriptor set was always 0 because it wasn't gathered by the
shader info pass.
This fixes CPU crashes with
arb_shader_texture_image_samples-builtin-image and Zink.
Cc: 21.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13411 >
2021-10-18 16:47:50 +00:00
Connor Abbott
de568c3b2c
tu/clear_blit: Stop creating a franken-image for staging blits
...
Extricate the last use of tu_image_*.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13359 >
2021-10-18 16:00:39 +00:00
Connor Abbott
9803c1aa10
tu: Remove cross-check scaffolding
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13359 >
2021-10-18 16:00:39 +00:00
Connor Abbott
d785aea530
tu: Switch clear/blit to fdl6_view and cross-check
...
This will help us create staging resources with a Y8 format and avoids
calling into the Vulkan-level entrypoints which will have to be changed
to use vk_image and vk_image_view.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13359 >
2021-10-18 16:00:39 +00:00
Connor Abbott
1874e12f19
tu: Use fdl6_view in tu_image_view and cross-check
...
Because some of the fields aren't filled out when a format doesn't
support rendering, we temporarily clear the structure so that we can
compare.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13359 >
2021-10-18 16:00:39 +00:00
Connor Abbott
5509132a80
freedreno/fdl: Add fdl6_view
...
This is mostly based on tu_image_view. The notable difference is that we
don't handle choosing the correct plane out of multiple planes when
indicated by the aspect, which means that there is no equivalent of
VK_IMAGE_ASPECT_PLANE_1 etc. This is expected to be done in the driver,
and note that freedreno gallium handles this very differently anyway.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13359 >
2021-10-18 16:00:38 +00:00
Connor Abbott
464b9d6bf1
freedreno/fdl: Add mip_level to fdl_layout
...
We need this when calculating the descriptors in the image view.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13359 >
2021-10-18 16:00:38 +00:00
Connor Abbott
7bcccd1f08
freedreno/fdl: Constify fdl6_get_ubwc_blockwidth()
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13359 >
2021-10-18 16:00:38 +00:00
Connor Abbott
7a90aa8d2e
vk/format, v3dv: Add a vulkan -> pipe swizzle helper
...
And use it to replace the one in v3dv.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13359 >
2021-10-18 16:00:38 +00:00
Pierre-Eric Pelloux-Prayer
7a2e40df5e
Revert "gallium: add a is_dri_blit_image bool to pipe_blit_info"
...
This reverts commit 22a1b7c5b3 .
The only use was radeonsi and it switched to PIPE_BIND_DRI_PRIME
instead.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13362 >
2021-10-18 17:16:53 +02:00