Alyssa Rosenzweig [Wed, 21 Dec 2022 01:59:26 +0000 (20:59 -0500)]
asahi: Add XML for linear 2D arrays
These look a bit like compressed images, and elucidate one of the common fields.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20446>
Alyssa Rosenzweig [Thu, 22 Dec 2022 03:00:56 +0000 (22:00 -0500)]
asahi: Add XML required for vertex shader side effects
Basically for rasterizer discard. We'll use these in a moment to implement
transform feedback.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20446>
Alyssa Rosenzweig [Tue, 20 Dec 2022 19:22:00 +0000 (14:22 -0500)]
asahi: Dump uniforms when decoding
These often have addresses in them.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20446>
Alyssa Rosenzweig [Mon, 19 Dec 2022 19:41:36 +0000 (14:41 -0500)]
asahi: Check box implement NV_conditional_render
Use the freedreno lowering. It'll be slow but I don't know of any apps that
actually use this and it's required for GL 3.0.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20446>
Alyssa Rosenzweig [Wed, 21 Dec 2022 17:12:47 +0000 (12:12 -0500)]
ail: Add compression_layer_stride_B field
So we can index into the compression buffer of layered images.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20446>
Alyssa Rosenzweig [Wed, 21 Dec 2022 01:57:21 +0000 (20:57 -0500)]
ail: Support linear 2D arrays
These are straightforward.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20446>
Alyssa Rosenzweig [Mon, 19 Dec 2022 19:30:36 +0000 (14:30 -0500)]
docs/features: Add more missed asahi
Should already be there.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20446>
Rob Clark [Tue, 3 Jan 2023 15:49:58 +0000 (07:49 -0800)]
freedreno/decode: Deal with suballocated buffers
We can end up logging both the buffer that the toplevel cmdstream is
allocated, as well as the sub-allocated part of that buffer. Possibly
the kernel could do better about this, but to avoid undecodeable
cmdstream dumps and devcores, detect this case and deal with it.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20496>
Rob Clark [Mon, 2 Jan 2023 17:19:49 +0000 (09:19 -0800)]
freedreno: Limit max draws per batch
Mostly so that piglit drawoverhead doesn't OoM itself with absurd # of
draws.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20496>
Rob Clark [Mon, 2 Jan 2023 16:45:51 +0000 (08:45 -0800)]
freedreno/drm: Add nr_suballoc_bos size check
We also want to ensure we don't hit the limit of max suballoc BOs.
Piglit drawoverhead would manage to hit this.
Fixes:
48610676897 ("freedreno/drm: Add sub-allocator")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20496>
Rob Clark [Mon, 2 Jan 2023 16:35:44 +0000 (08:35 -0800)]
freedreno: Fix FD_MESA_DEBUG=nohw
We need to construct a dummy fence in this case.
Fixes:
48b5164356c ("freedreno/drm: Return fence from submit flush")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20496>
Rob Clark [Sun, 1 Jan 2023 20:17:41 +0000 (12:17 -0800)]
freedreno/drm: Mark ring heap buffers for dumping
Ensure that these get FD_RELOC_DUMP flag set so cmdstream dumps and
devcore's capture them.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20496>
Bas Nieuwenhuizen [Fri, 23 Dec 2022 13:31:40 +0000 (14:31 +0100)]
radv: Always compile accel structure shaders on demand.
Some CTS tests enable all extensions ... , which combined with having
no shader cache on some platforms results in some CTS tests timing
out (in particular tests recreating the device all the time).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20422>
Bas Nieuwenhuizen [Fri, 23 Dec 2022 13:09:12 +0000 (14:09 +0100)]
radv: Support on demand compilation of fmask shaders.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20422>
Pavel Ondračka [Wed, 7 Dec 2022 15:19:30 +0000 (16:19 +0100)]
r300: lower fsign in nir
Nothing significant in shader-db on RV530:
total instructions in shared programs: 134963 -> 134957 (<.01%)
instructions in affected programs: 1108 -> 1102 (-0.54%)
helped: 7
HURT: 1
total temps in shared programs: 17153 -> 17154 (<.01%)
temps in affected programs: 38 -> 39 (2.63%)
helped: 2
HURT: 3
Just some fluctuations from pair scheduling due to different code order.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20208>
Pavel Ondračka [Wed, 7 Dec 2022 15:14:12 +0000 (16:14 +0100)]
r300: move some ftrunc lowering to nir
There are still some ftruncs left as most of them originates in
nir_lower_int_to_float and that is currently called after nir_opt_algebraic
in ntt.
No change in shader-db.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20208>
Pavel Ondračka [Wed, 7 Dec 2022 15:11:41 +0000 (16:11 +0100)]
r300: use nir lowering for ffloor
Negligible amount of instructions saved on RV530:
total instructions in shared programs: 134970 -> 134963 (<.01%)
instructions in affected programs: 2273 -> 2266 (-0.31%)
helped: 9
HURT: 1
The one hurt shader is when we fail to recognize the x - ffract(x)
pattern and skip the don't emit ftrunc optimization as implemented
in the previous patch due to some non-trivial swizzles going on.
Signed-off-by: Pavel Ondračka <pave.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Acked-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20208>
Pavel Ondračka [Wed, 7 Dec 2022 15:10:01 +0000 (16:10 +0100)]
nir: check for x - ffract(x) patterns when lowering f2i32
We already skip emitting ftrunc in nir_lower_int_to_float when there is
ffloor, fround or any other integer-making opcode preceding f2i32. However
if lower_ffloor is set for driver that doesn't support integers, the lowered
x - ffract(x) patterns would not be recognized and extra ftruct would be
emitted, doing unnecessary rounding.
This optimization only works if there is no non-trivial swizzling used for
the fadd, fneg and ffract involved, which seems to be 99% of the cases according
to my testing.
This is needed to enable nir ffloor lowering on r300 driver without regressions.
I'm not sure if this helps anybody else, the only hardware which sets
lower_ffloor and converts ints to floats (and can't do trunc) are some old
etnaviv cards, so maybe it will help there a bit.
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20208>
Pierre-Eric Pelloux-Prayer [Mon, 2 Jan 2023 16:27:41 +0000 (17:27 +0100)]
egl: handle NULL loaderPrivate in dri_is_thread_safe
This can happen when a context is created from
loader_dri3_blit_context_get and glthread is enabled.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7949
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7960
Cc: mesa-stable
Acked-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20479>
Samuel Pitoiset [Wed, 14 Dec 2022 12:43:47 +0000 (13:43 +0100)]
radv: use vk_dynamic_graphics_state for the color blend state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20314>
Samuel Pitoiset [Wed, 14 Dec 2022 09:31:53 +0000 (10:31 +0100)]
radv: rework some color blend state fields for vk_dynamic_graphics_state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20314>
Samuel Pitoiset [Wed, 14 Dec 2022 11:00:52 +0000 (12:00 +0100)]
radv: use vk_dynamic_graphics_state for the multisample state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20314>
Samuel Pitoiset [Wed, 14 Dec 2022 09:00:52 +0000 (10:00 +0100)]
radv: use vk_dynamic_graphics_state for the depth stencil state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20314>
Samuel Pitoiset [Wed, 14 Dec 2022 08:53:49 +0000 (09:53 +0100)]
radv: use vk_dynamic_graphics_state for the rasterization state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20314>
Samuel Pitoiset [Wed, 14 Dec 2022 08:23:09 +0000 (09:23 +0100)]
radv: use vk_dynamic_graphics_state for the discard rectangles state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20314>
Samuel Pitoiset [Wed, 14 Dec 2022 08:18:08 +0000 (09:18 +0100)]
radv: use vk_dynamic_graphic_state for the viewport state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20314>
Samuel Pitoiset [Wed, 14 Dec 2022 07:57:09 +0000 (08:57 +0100)]
radv: use vk_dynamic_graphics_state for the input assembly state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20314>
Samuel Pitoiset [Wed, 14 Dec 2022 07:54:10 +0000 (08:54 +0100)]
radv: use vk_dynamic_graphics_state for the tessellation state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20314>
Samuel Pitoiset [Wed, 14 Dec 2022 07:49:52 +0000 (08:49 +0100)]
radv: use vk_dynamic_graphics_state for the fragment shading rate state
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20314>
Samuel Pitoiset [Wed, 14 Dec 2022 08:09:04 +0000 (09:09 +0100)]
radv: move viewport pre-computed xform outside of radv_viewport_state
I think we should distinguish between dynamic states (applications) and
hardware states, and this will allow us to use vk_viewport_state
instead of our own structs.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20314>
Pierre-Eric Pelloux-Prayer [Fri, 16 Dec 2022 15:16:45 +0000 (16:16 +0100)]
vbo/save: avoid dangling_attr_ref situation
dangling_attr_ref=true can be set when the following happens:
glBegin(GL_TRIANGLES)
glVertex(...)
glVertex(...)
glColor4(...)
glVertex(...)
When glColor4 is hit, the first 2 vertices are copied to the vertex_store
by upgrade_vertex, but since this is done before glColor4 new values are
copied, we make a note to fixup these attribute laters using dangling_attr_ref.
This causes very slow rendering. What this commit does instead, is in this
situation, the new attribute value are backported to the vertex store for the
copied vertices after upgrade_vertex is done updating the layout.
This avoids the slow corner case.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7912
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20495>
Pierre-Eric Pelloux-Prayer [Fri, 16 Dec 2022 13:58:31 +0000 (14:58 +0100)]
vbo: simplify current_init since VBO_ATTRIB_POS is 0
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20495>
Max Lee [Wed, 4 Jan 2023 22:52:40 +0000 (09:52 +1100)]
intel_noop_drm_shim: add ability to specify device id
Given a GPU platform, there are multiple device ids. This commit
adds ability to specify device id for the shim, instead of using
one of the hard-coded device ids per platform.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20526>
Maíra Canal [Sat, 31 Dec 2022 13:44:18 +0000 (10:44 -0300)]
v3dv: initialize fd variable for proper error handling
Currently, process_singlesync_signals() checks if fd == -1 to handle
possible errors in the drmSyncobjExportSyncFile function. But, fd is not
initialized, which means that drmSyncobjExportSyncFile might fail and
the error will not be handled as fd might not be equal to -1.
Therefore, initialize the fd variable with value -1 to ensure proper
error handling.
cc: mesa-stable
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20475>
Martin Roukala (né Peres) [Thu, 29 Dec 2022 07:16:53 +0000 (09:16 +0200)]
ci/b2c: start making use of the harbor.fd.o
A new container registry was added recently in the fd.o infrastructure.
It is located in a datacenter that does not charge for bandwidth usage,
and aims to become the canonical registry in the future. It is however
currently configured to be a partial mirror of registry.fd.o, where
only the most-downloaded container images can be found.
The address of the new registry is specified in mesa/mesa's CI
variables, which means forks will default to registry.fd.o. However,
Valve Infra DUTs do not have access to the internet, and instead use
another cache proxy hosted locally on the CI gateways. This forced
Benjamin to overwrite the registry URL from harbor.freedesktop.org to
registry.freedesktop.org in
0bd9a062e1ab ("CI: Overwrite valve infra's
registry").
After adding support for the new registry in valve infra, then
deploying the update, we are now able to make use of the new container
registry. This commit simply rewrites the URL harbor.freedesktop.org
into `{{ harbor_fdo_registry }}`. This variable is set in the valve
infra to point to the `host:ip` of the service, which means changes to
the way we deploy this service can be done on the valve-infra side
without needing to make changes to every project that makes use of our
machines.
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7913
Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20450>
Qiang Yu [Fri, 2 Dec 2022 03:53:22 +0000 (11:53 +0800)]
ac/nir: handle 16bit varying streamout for legacy vs and gs copy shader
This is for VARYING_SLOT_VARx_16BIT slots varying streamout.
OpenGL ES will store 16bit medium precision varying to these slots.
Vulkan is not allowed to streamout varying less than 32bit.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20157>
Qiang Yu [Thu, 1 Dec 2022 08:48:16 +0000 (16:48 +0800)]
ac/nir,radv: use ac_nir_gs_output_info
We are also going to add more fields in it.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20157>
Qiang Yu [Mon, 21 Nov 2022 07:53:11 +0000 (15:53 +0800)]
nir/xfb: save high_16bits output info
It is combined with slot location to identify a varying
when using VARYING_SLOT_VARx_16BIT.
Acked-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20157>
Emma Anholt [Tue, 3 Jan 2023 22:33:44 +0000 (14:33 -0800)]
zink: Only expose PIPE_CAP_SHADER_ATOMIC_INT64 if we can do shared and ssbos.
Fixes:
3ac0706aa83b ("zink: export PIPE_CAP_SHADER_ATOMIC_INT64")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20506>
Emma Anholt [Tue, 3 Jan 2023 22:17:48 +0000 (14:17 -0800)]
zink: Only expose PIPE_CAP_IMAGE_ATOMIC_FLOAT_ADD if we can actually add.
Drivers may expose the ext without the add capability, if they can
load/store/exchange.
Fixes:
c32f046ab669 ("zink: export PIPE_CAP_IMAGE_ATOMIC_FLOAT_ADD")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20506>
Timothy Arceri [Wed, 4 Jan 2023 03:34:48 +0000 (14:34 +1100)]
util/00-mesa-defaults: add Metal Slug XX workaround
The game uses texture2D() in glsl 4.40 shaders, but texture2D()
was moved to compat in 4.20.
Cc: mesa-stable
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20511>
Felix DeGrood [Wed, 4 Jan 2023 01:31:37 +0000 (01:31 +0000)]
hasvk: Emit CS stall on INTEL_MEASURE timestamp
For INTEL_MEASURE, ensure all prior instructions completed before
timestamp taken. Continue to support no CS flush case for Perfetto.
CS stall was dropped from pipecontrol when adding u_trace support.
Fixes:
cc5843a573b ("anv: implement u_trace support")
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20502>
Felix DeGrood [Tue, 3 Jan 2023 19:22:30 +0000 (19:22 +0000)]
anv: Emit CS stall on INTEL_MEASURE timestamp
For INTEL_MEASURE, ensure all prior instructions completed before
timestamp taken. Continue to support no CS flush case for Perfetto.
CS stall was dropped from pipecontrol when adding u_trace support.
Fixes:
cc5843a573b ("anv: implement u_trace support")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20502>
Emma Anholt [Wed, 14 Dec 2022 19:41:08 +0000 (11:41 -0800)]
ci/zink: Add trace testing on anv TGL.
For now the restricted traces aren't available to the intel devs, so it
won't actually run for them, but I can manage that part for a bit until we
get the policy updated on the minio side (issue filed to do so).
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20503>
Emma Anholt [Wed, 14 Dec 2022 19:41:08 +0000 (11:41 -0800)]
ci/zink: Add a manual full run of CTS+piglit on tgl.
If we want to ship zink on anv for ChromeOS, we've got to be able to know
that the tree is green when we uprev.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20503>
Emma Anholt [Wed, 14 Dec 2022 20:12:40 +0000 (12:12 -0800)]
ci/zink: Refactor a bit of test configuration yaml.
I'm adding more zink tests shortly.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20503>
Emma Anholt [Wed, 14 Dec 2022 23:06:13 +0000 (15:06 -0800)]
ci: Set the path to the VK drivers during HWCI_START_XORG/WESTON.
If the test is running with zink, we want zink to be able to find the
vulkan driver.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20503>
Emma Anholt [Thu, 15 Dec 2022 01:29:19 +0000 (17:29 -0800)]
ci/iris: Add some recent flakes.
APL are clearly part of the existing set, glx-swap-copy on KBL is
plausibly new but it's a flake on other drivers too.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20503>
Marek Olšák [Sat, 24 Dec 2022 05:56:55 +0000 (00:56 -0500)]
mesa: set NewVertexElements when changing IsDynamic
Fixes:
0fbd82bdc45 - mesa: move calling _mesa_update_vao_derived_arrays into st_update_array
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7938
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20432>
Jesse Natalie [Fri, 16 Dec 2022 22:03:12 +0000 (14:03 -0800)]
dzn: Handle split front/back compare/write masks for dynamic state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20364>
Jesse Natalie [Fri, 16 Dec 2022 21:33:58 +0000 (13:33 -0800)]
dzn: For CmdBindIndexBuffer, look at the graphics pipeline instead of last used
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20364>
Jesse Natalie [Fri, 16 Dec 2022 18:08:01 +0000 (10:08 -0800)]
dzn: Don't touch pMultisampleState if rasterizerDiscardEnable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20364>
Jesse Natalie [Fri, 16 Dec 2022 18:07:37 +0000 (10:07 -0800)]
dzn: Remove spammy logging during device create
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20364>
Jesse Natalie [Wed, 14 Dec 2022 20:48:39 +0000 (12:48 -0800)]
dzn: Flip on enhanced barrier code paths based on D3D capability
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
Jesse Natalie [Wed, 14 Dec 2022 20:48:15 +0000 (12:48 -0800)]
dzn: Add an "enhanced" version of CmdPipelineBarrier2
This allows us to *much* more accurately express the app's barrier
requests. Unfortunately, there's still a few mismatches, so in those
cases we'll end up conservatively over-synchronizing/flushing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
Jesse Natalie [Wed, 14 Dec 2022 20:36:22 +0000 (12:36 -0800)]
dzn: Add an enhanced barrier path for internal and fixup barriers
While enhanced barriers is a *much* closer model to Vulkan's, there's
still one big mismatch: Vulkan's "transfer" concept supports clears,
copies, and resolves, while D3D's closest match only supports copies.
So when doing clears and resolves, we need to transition from the copy
layout to the correct layout, and then back.
Internal barriers are done for some meta scenarios as well as render
pass initial layout transitions. These look more or less the same as
non-enhanced, we just want to avoid mixing the two paradigms if possible.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
Jesse Natalie [Wed, 14 Dec 2022 20:30:12 +0000 (12:30 -0800)]
dzn: CmdWaitForEvents needs to submit barriers too
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
Jesse Natalie [Wed, 14 Dec 2022 20:29:48 +0000 (12:29 -0800)]
dzn: Fix aspects used for blit barriers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
Jesse Natalie [Wed, 14 Dec 2022 20:28:51 +0000 (12:28 -0800)]
dzn: Remove unnecessary read -> read transition barriers
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
Jesse Natalie [Wed, 14 Dec 2022 20:24:24 +0000 (12:24 -0800)]
dzn: Respect sharing mode
D3D's "simultaneous access" concept pretty closely matches
Vulkan's concurrent sharing mode, except that we don't
support simultaneous access for depth buffers.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
Jesse Natalie [Wed, 14 Dec 2022 20:22:14 +0000 (12:22 -0800)]
dzn: Store valid BARRIER_ACCESS flag masks for a few objects
A subset of total access flags are valid based on command list
type and resource flags, so store that set during object creation.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
Jesse Natalie [Wed, 14 Dec 2022 20:18:24 +0000 (12:18 -0800)]
dzn: Store command list type in the command buffer object
We'll want to use this for choosing queue-type-specific
layouts in the new pipeline barrier implementation.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
Jesse Natalie [Wed, 14 Dec 2022 20:16:43 +0000 (12:16 -0800)]
dzn: Create all buffers in COMMON state
Since they promote/decay, there's no point in using any
other initial state value.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
Jesse Natalie [Fri, 9 Dec 2022 21:42:19 +0000 (13:42 -0800)]
dzn: Delete initial_state which is always COMMON
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20324>
Karmjit Mahil [Thu, 20 Oct 2022 10:24:14 +0000 (11:24 +0100)]
pvr: Remove PVR_STATIC_CLEAR_.*_BIT and use VkImageAspectFlags.
This commit removes the PVR_STATIC_CLEAR_.*_BIT used to index the
static clear templates in the device. Now we use the Vulkan flags
so no need for any conversion of the flags.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Mon, 26 Sep 2022 15:52:53 +0000 (16:52 +0100)]
pvr: Implement color/depth/depth+stencil attachment clear.
The depth/depth+stencil clear was already implemented. This adds
the z replication and color attachment clear branches.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Tue, 4 Oct 2022 15:59:14 +0000 (16:59 +0100)]
pvr: Add clear attachment programs in device.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Wed, 5 Oct 2022 09:35:42 +0000 (10:35 +0100)]
pvr: Add comments documenting large/normal clear words.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Tue, 4 Oct 2022 14:44:04 +0000 (15:44 +0100)]
pvr: Add empty clear attachment usc programs.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Mon, 26 Sep 2022 15:52:44 +0000 (16:52 +0100)]
pvr: Implement depth/stencil/depth+stencil attachment clear.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Wed, 23 Nov 2022 15:56:59 +0000 (15:56 +0000)]
pvr: Fix typo in 'err_free_verices_buffer'.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Fri, 23 Sep 2022 16:24:05 +0000 (17:24 +0100)]
pvr: Add pvr_clear_vertices_upload().
This function allows to easily setup and upload the vertices
required to clear a specific area. The vertices are
arranged in a triangle strip.
This will also be used in following commits implementing
vkCmdClearAttachments().
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Wed, 28 Sep 2022 15:30:33 +0000 (16:30 +0100)]
pvr: Move static clear state into pvr_clear.c .
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Wed, 21 Sep 2022 15:41:10 +0000 (16:41 +0100)]
pvr: Add layer count support to pvr_clear_vdm_state().
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Wed, 21 Sep 2022 15:52:48 +0000 (16:52 +0100)]
pvr: Move clear VDM state into pvr_clear.h .
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Wed, 21 Sep 2022 13:40:23 +0000 (14:40 +0100)]
pvr: Add clear rta vert shader pds program.
The rta program will be used in following commits adding support
for vkCmdClearAttachments().
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Tue, 20 Sep 2022 13:23:57 +0000 (14:23 +0100)]
pvr: Add pvr_clear.{h,c} .
This moves some clear related functionality into a new
pvr_clear.{h,c} just to for better organisation and allow for
easier reusability.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Thu, 15 Sep 2022 15:09:23 +0000 (16:09 +0100)]
pvr: Add multi layer passthough vert shader upload in device.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Karmjit Mahil [Thu, 15 Sep 2022 14:43:13 +0000 (15:43 +0100)]
pvr: Change "ID" to "id" in instance_ID_modifier.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20055>
Corentin Noël [Wed, 4 Jan 2023 10:34:46 +0000 (11:34 +0100)]
ci: Remove MESA_ARM_BUILD_TAG environment variable
Its value is already the same as MESA_IMAGE_TAG so no need to duplicate it.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20488>
Corentin Noël [Tue, 3 Jan 2023 10:51:24 +0000 (11:51 +0100)]
ci: Bump crosvm and virglrenderer versions
Update virglrenderer and crosvm to the latest version on time.
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20488>
Gert Wollny [Wed, 4 Jan 2023 13:31:48 +0000 (14:31 +0100)]
r600/sfn: make sure we return a non-negative number of registers
If a shader doesn't use any register and only ssa values we might
end up with zero minimum registers, and because a unsigned is
returned that goes wrong.
Fixes:
565816dfa15214abbeef9a9d94e44f30507ca4d7
r600/sfn: Set minimum required registers based on array allocation
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8008
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20516>
Samuel Pitoiset [Fri, 16 Dec 2022 12:26:36 +0000 (13:26 +0100)]
radv: rework generating the PS epilog key
Generating a PS epilog key will also be used when compiling PS epilogs
on-demand. This introduces a new helper that generates it.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20485>
Samuel Pitoiset [Fri, 16 Dec 2022 09:01:00 +0000 (10:01 +0100)]
radv: simplify removing unused color exports
If CB_TARGET_MASK (color write mask) is 0 for a given MRT, this implies
that the color format is 0 because the driver compacts MRTs.
No fossils-db changes.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20485>
Danylo Piliaiev [Tue, 3 Jan 2023 15:29:50 +0000 (16:29 +0100)]
docs/freedreno: Extract debug tooling docs and improve gpu dbg docs
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20492>
Rhys Perry [Mon, 2 Jan 2023 19:17:16 +0000 (19:17 +0000)]
radv/winsys: set has_3d_cube_border_color_mipmap for null winsys
Without this, NIR->LLVM will set level_zero to false, crashing compilation
of some GFX11 shaders with LLVM (image_gather4_c_o is not supported, while
image_gather4_c_lz_o is).
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20483>
Danylo Piliaiev [Tue, 3 Jan 2023 12:34:24 +0000 (13:34 +0100)]
docs/freedreno: Extract LRZ docs from tu_lrz
Most of the docs describe HW and are not specific to Turnip.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20491>
Samuel Pitoiset [Thu, 24 Nov 2022 14:07:32 +0000 (15:07 +0100)]
radv: fix multiple resolves in the same subpass
If there is multiple resolves, the driver shouldn't always select the
fragment path because it doesn't work for all images.
Fixes dEQP-VK.pipeline.monolithic.multisample.misc.*
Cc: 22.3 mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19986>
Ian Romanick [Tue, 13 Dec 2022 18:49:41 +0000 (10:49 -0800)]
glsl: Remove bit_count lowering
As far as I can tell, every driver that supports GLSL 1.30 or
GL_EXT_gpu_shader4 (and therefore also enables support for
GL_MESA_shader_integer_functions) also sets the NIR lower_bit_count
flag.
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20323>
Ian Romanick [Tue, 13 Dec 2022 18:42:49 +0000 (10:42 -0800)]
glsl: Remove bitfield_reverse lowering
As far as I can tell, every driver that supports GLSL 1.30 or
GL_EXT_gpu_shader4 (and therefore also enables support for
GL_MESA_shader_integer_functions) also sets the NIR
lower_bitfield_reverse flag.
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20323>
Ian Romanick [Tue, 13 Dec 2022 18:36:18 +0000 (10:36 -0800)]
glsl: Remove bitfield_extract and bitfield_insert lowering
As far as I can tell, every driver that supports GLSL 1.30 or
GL_EXT_gpu_shader4 (and therefore also enables support for
GL_MESA_shader_integer_functions) also sets some subset of the various
NIR lower_bitfield_extract and lower_bitfield_insert flags.
v2: Declaration of 'result' still needs to be added to the IR. Noticed
by marge.
v3: Fix 'git rebase --autosquash' putting the v2 fix in the wrong
place. I've never seen that happen before. :(
Reviewed-by: Emma Anholt <emma@anholt.net> [v1]
Reviewed-by: Matt Turner <mattst88@gmail.com> [v1]
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20323>
Ian Romanick [Tue, 13 Dec 2022 19:11:13 +0000 (11:11 -0800)]
nir: Don't allow conflicting bitfield lowering passes
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20323>
Ian Romanick [Tue, 13 Dec 2022 17:43:39 +0000 (09:43 -0800)]
intel/compiler: Enable lower_bitfield_extract_to_shifts and lower_bitfield_insert_to_shifts for pre-Gfx7
GLSL IR opcodes generated for bitfieldExtract and bitfieldInsert are
lowered by lower_instructions.
4dff3ff005b ("nir/opt_algebraic:
Optimize open coded bfm.") adds an optimization that can rematerialize
nir_op_bfm that was prevented by the GLSL IR lowering.
It appears that every piece of hardware, except older Intel GPUS, that
has real integers (i.e., lower_bitops is not set) also sets
lower_bitfield_extract_to_shifts and lower_bitfield_insert_to_shifts.
Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Fixes:
4dff3ff005b ("nir/opt_algebraic: Optimize open coded bfm.")
Closes: #7874
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20323>
Jason Ekstrand [Wed, 21 Dec 2022 22:59:02 +0000 (16:59 -0600)]
util: Drop the ENUM_PACKED macro
We have both PACKED and ENUM_PACKED macros which expand to the same
thing. PACKED was based on a meson check for function attributes while
ENUM_PACKED appears to be a legacy gallium thing which was based on
defined(__GCC__). This changes the one use of ENUM_PACKED to PACKED and
deletes ENUM_PACKED.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20412>
Emma Anholt [Tue, 29 Nov 2022 22:35:19 +0000 (14:35 -0800)]
ci: Update the skqp testing docs and retire the old runner script.
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20070>
Emma Anholt [Tue, 29 Nov 2022 22:26:47 +0000 (14:26 -0800)]
ci/intel: Switch skqp testing over to deqp-runner.
The skqp runner gets us parallel execution, automatic caselist handling,
nice reports, and the same xfail/flake handling you know and love from
deqp and piglit.
And, now that we have flake handling, we can turn the tests back on!
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20070>
Emma Anholt [Tue, 29 Nov 2022 22:23:56 +0000 (14:23 -0800)]
ci/amd: Switch raven skqp testing over to deqp-runner.
The skqp runner gets us parallel execution, automatic caselist handling,
nice reports, and the same xfail/flake handling you know and love from
deqp and piglit.
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20070>
Emma Anholt [Tue, 29 Nov 2022 22:19:34 +0000 (14:19 -0800)]
ci/freedreno: Switch skqp testing to using deqp-runner.
The skqp runner gets us parallel execution, automatic caselist handling
(which would have prevented a recent regression due to some skqp tests
having been forgotten in the checked in caselists), nice reports, and the
same xfail/flake handling you know and love from deqp and piglit.
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20070>
Adam Jackson [Mon, 12 Dec 2022 15:59:44 +0000 (10:59 -0500)]
glx: Remove the GetProcAddress special case for indirect rendering
Some GL entrypoints would be aliased in an API sense but have different
GLX protocol. The only one that matters to us is EXT_texture_object,
which is the pre-GL-1.1 API. We're just going to drop support for that
and assume you have 1.1 or better, since 1.0 + EXT_texture_object is a
vanishingly rare combo at this point.
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20300>
Adam Jackson [Thu, 8 Dec 2022 16:44:08 +0000 (11:44 -0500)]
glx: Only compute client GL extensions for indirect contexts
This is sort of a spiky way to do it, but the effect is to send the
appropriate SetClientInfo twice for indirect screens, where the second
one fills in the GL extensions. We can get away with this because the
only place the string is used is when the server computes the reply for
glGetString(GL_EXTENSIONS), which never matters for direct contexts.
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20300>