Commit Graph

154521 Commits

Author SHA1 Message Date
Alyssa Rosenzweig
a5e6a5e585 asahi: Identify more depth pipeline fields
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
2022-05-22 17:09:00 -04:00
Alyssa Rosenzweig
6aadd72bd4 asahi: Account for every byte of the cmdbuf
This adds the remaining XML. I don't know how much of this is correct,
but it nominally accounts for every byte. So there shouldn't be more
surprises in the command buffer after this.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
2022-05-21 22:01:33 -04:00
Alyssa Rosenzweig
c61e660323 asahi: Handle 3rd deflake address
Context switching is so broken. Just trying to get closer. Adding some
XML here to see if we're missing something else obvious.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
2022-05-21 22:01:33 -04:00
Alyssa Rosenzweig
3be0314e5a asahi: Flush on partial clears
Not the fastest thing, but should be conformant. (Panfrost to this day
has this effective behaviour...)

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
2022-05-21 22:01:33 -04:00
Alyssa Rosenzweig
95a18d1c1c asahi: Pass depth/stencil clear values to firmware
These need to be format-packed, but as we only support Z32F_S8 right
now, that's trivial.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
2022-05-21 22:01:32 -04:00
Alyssa Rosenzweig
43f6c08a3b asahi: Handle uncompressed Z32F depth buffers
This uses a subset of the depth/stencil infrastructure we built out to
support writing back tiled, uncompressed Z32F depth buffers to memory.
Texturing from this format is already supported.

This gets glmark2 -bshadow working.

v2: Fix partial renders

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
2022-05-21 22:01:32 -04:00
Alyssa Rosenzweig
c955dd726e asahi: Don't store to unbound render targets
Otherwise we have a state leak with depth-only attachments, as in
glmark2 -bshadow.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
2022-05-21 22:01:32 -04:00
Alyssa Rosenzweig
a0fc622be5 asahi: Validate depth/stencil formats
Don't go advertising formats we don't actually support.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
2022-05-21 22:01:32 -04:00
Alyssa Rosenzweig
e6c809d767 asahi: Use z24_in_z32f lowering
Thanks Dave!

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
2022-05-21 22:01:32 -04:00
Alyssa Rosenzweig
0ea174f38c asahi: Run lower_blend for all fragment shaders
Unify the paths so that colour masks are respected even when regular
blending is off (or when logic ops are used!) Fixes

dEQP-GLES2.functional.color_clear.masked_rgb

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
2022-05-21 22:01:32 -04:00
Mike Blumenkrantz
aa32b96c51 turnip: fix assert for max xfb outputs
this is a counter, not an index, so use <=

cc: mesa-stable

Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16620>
2022-05-21 16:48:54 +00:00
Chia-I Wu
2a8e6a4d1a turnip: disable UBWC for SNORM formats
In copy_format, we treat snorm as unorm to avoid clamping.  But snorm
and unorm are UBWC incompatible for special values such as all 0's or
all 1's.  Disable UBWC for snorm.

For reference, I dumped the first byte of an UBWC blocks and it was

  color      UNORM  SNORM
  all black  0x01   0x31
  all white  0x0d   0x11

@flto clarified that bit 4 is unset for fast clear encoded blocks.  It
looks like fast clear is not used for SNORM.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6480
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16534>
2022-05-21 15:27:42 +00:00
Jeffrey Knockel
d7dc27645e egl: dereference XCB drawable pointers
eglCreatePlatformWindowSurface[EXT] and
eglCreatePlatformPixmapSurface[EXT] should be passed (xcb_window_t *)
and (xcb_pixmap_t *), so we must dereference these types before using
them as drawables.  We already do something similar with X11 drawable
pointers.

Signed-off-by: Jeffrey Knockel <jeff@jeffreyknockel.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16269>
2022-05-21 14:42:06 +00:00
Karol Herbst
cd8c083ab5 clc: disable opaque pointers until they are supported
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16479>
2022-05-21 12:26:37 +00:00
Karol Herbst
b6ed3c6ea2 clc: fix compiler features_macro CTS Test
Even with that alone we can't pass the test, as LLVM enables some
extensions based on the SPIR target we choose.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16479>
2022-05-21 12:26:37 +00:00
Karol Herbst
bcc2df4890 clc: speed up compilation by not relying on opencl-c.h
This depends on LLVM change: https://reviews.llvm.org/D125401

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16479>
2022-05-21 12:26:37 +00:00
Karol Herbst
e5a052f75f clc: drop parsingComplete check
This relies too much on the properties of the SPIRV-LLVM-Translator and is
required to load SPIR-Vs found in the OpenCL CTS.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16479>
2022-05-21 12:26:37 +00:00
Karol Herbst
c0cf7f578a clc: parse localSize and localSizeHint
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16479>
2022-05-21 12:26:37 +00:00
Chia-I Wu
e8eb6d13a5 turnip: fix tu6_pack_border_color for z24
The value should be at the bottom 24 bits, not at the top.

dEQP-VK.pipeline.sampler.* still passes.  This fixes most of
dEQP-GLES31.functional.texture_border_clamp.formats.*depth* on angle.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16570>
2022-05-21 00:54:28 +00:00
Icecream95
2f2ddfa0ac panfrost: Move patched_s out of the pan_blitter_views struct
The struct is returned from a function, so in debug builds the address
may change after returning, and pointers to patched_s will be broken.

Pass the pointer to the patched stencil view as a parameter to
pan_preload_get_views to avoid this.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16343>
2022-05-20 23:17:07 +00:00
Icecream95
f1f39fa645 panfrost: Increase the limit for blend shader variants
Qt uses blend constants to set text colour, this will allow more
colours onscreen before thrashing happens.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16343>
2022-05-20 23:17:07 +00:00
Icecream95
80404c8b64 panfrost: Copy blend constant into variant even when reusing it
Otherwise future lookups will match searches for the old constant.

Fixes: bbff09b952 ("panfrost: Move the blend shader cache at the device level")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6355
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16343>
2022-05-20 23:17:07 +00:00
Mike Blumenkrantz
c81cd989c8 zink: use dynamic rendering (most of the time)
this is a simplified version of the renderpass infrastructure which
tracks rendering info on the context and updates it incrementally to
try and reduce cpu overhead

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
b25b8027e5 zink: split out scissor flagging from framebuffer updating
this is kinda similar but not actually the same thing

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
91a9676a0c zink: lift some renderpass mechanics up a level in the api
(should be) no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
ec3a7323da zink: track whether there's any transient attachments bound
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
b2a33d364e zink: break out zs rt attrib analysis into util function
(should be) no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
728fa3606a zink: break out color rt attrib analysis into util function
(should be) no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
4769b4e610 zink: fix indentation
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
69efe357b3 zink: pass rt attrib to zink_render_pass_attachment_get_barrier_info()
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
079b95fc6a zink: remove renderpass state flag for swapchain
this is redundant and can be merged onto the rt attrib

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
e107fa386b zink: break up swapchain renderpass update to util function
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
190ccf3324 zink: break out sample location updating to separate function
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
3ef8cdbab2 zink: use local variable for getting rt barrier info
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
37f9b8ef9b zink: remove fb rebind check during renderpass begin
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
3d145ec7f1 zink: use global image rebind counter for dmabuf export
this is a bit less flimsy and handles more than just framebuffer rebinds

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
b181080d9f zink: move renderpass handling to zink_render_pass.c
no functional changes

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
4457a9388a zink: use zink_batch_no_rp to end renderpasses
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
3e1cd9f623 zink: always use zink_batch_rp to init renderpass
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Mike Blumenkrantz
9a03beb2e9 zink: rename a fb surface variables
no functional changes, just being more consistent

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16476>
2022-05-20 16:42:21 +00:00
Samuel Pitoiset
95d4e5435b radv: export implicit primitive ID in NIR for legacy VS or TES
It's implicit for VS or TES, while it's required for GS or MS.

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/16404>
2022-05-20 14:55:05 +00:00
Samuel Pitoiset
d711e9813c radv: determine if shaders use NGG before linking
This would be needed by some NIR pass during linking. Given that NGG
settings are currently dispatched in many places, I don't think this
should hurt but it should be refactored at some point.

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/16404>
2022-05-20 14:55:05 +00:00
Iago Toral Quiroga
b90d7b9b38 broadcom/compiler: don't promote early fragment tests when writing sample mask
If the sample mask is being written it means we want to discard some of the
samples generated so we should not be promoting the fragment shader to
do early tests, since that would not take into account the sample mask
written from the shader.

Fixes:
dEQP-VK.fragment_operations.early_fragment.sample_count_early_fragment_tests_depth_samples_4

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16626>
2022-05-20 13:04:32 +00:00
Iago Toral Quiroga
a987167ebd v3dv: fix format usage checks when extended usage flag is set
Fixes:
dEQP-VK.image.extended_usage_bit_compatibility.*

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16625>
2022-05-20 12:38:19 +00:00
Iago Toral Quiroga
2c420fcf40 v3dv: expose VK_KHR_vulkan_memory_model
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16602>
2022-05-20 12:00:44 +00:00
Hyunjun Ko
f2635ca47b turnip: add an assertion for max descriptor set count.
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16624>
2022-05-20 09:49:00 +00:00
Lucas Stach
53445284a4 etnaviv: add linear PE support
GPUs with the LINEAR_PE feature bit have the ability to render into linear
buffers. While this decreases PE cache effectiveness and is thus slower than
rendering into a (super-)tiled buffer, it's still preferable for cases where
we would need a blit to get into linear otherwise, i.e. when importing a
linear buffer or when linear is forced on allocation by usage flags or
modifiers.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16615>
2022-05-20 09:30:18 +00:00
Lucas Stach
8452bd7984 etnaviv: improve single buffer setup
The blob only switches to the 3 single buffer state when required, which seems
to be the case when any color or ZS target is <= 16bpp. Using 2 as the single
buffer state gives a very small 1-2% performance improvement on fillrate
constrained rendering, so it likely affects some PE cache setting.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16615>
2022-05-20 09:30:18 +00:00
Sil Vilerino
cbb81e09ee winsys: Do not use Display type when X11 is not present in build
Reviewed-by: Adam Jackson <ajax@redhat.com>

Closes: mesa/mesa#6520
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16608>
2022-05-20 09:06:41 +00:00
Pierre-Eric Pelloux-Prayer
e87135c552 radeonsi/tests: use a smaller tests-per-group value
Faster glcts runs (44 -> 34 sec).

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16580>
2022-05-20 09:57:14 +02:00