Commit graph

157714 commits

Author SHA1 Message Date
Dave Airlie
5449e6d14c draw: don't touch info values that aren't valid.
These shouldn't be accessed, and shows up as an uninit access in
valgrind with piglit rasterpos

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10641>
2022-08-05 06:18:44 +00:00
Dave Airlie
f4abd32749 llvmpipe/ci: update ci results for clover.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10641>
2022-08-05 06:18:44 +00:00
Dave Airlie
0d41c4b3d9 lavapipe: scan shader for info before lowering images.
Otherwise the values will be wrong.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10641>
2022-08-05 06:18:44 +00:00
Dave Airlie
5036e0a08e lavapipe: lower images to non-derefs in vulkan side
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10641>
2022-08-05 06:18:44 +00:00
Dave Airlie
a17635e988 gallivm/nir/st: lower image derefs in advance.
This improves clover from crashing to just failing, but I mainly
want it this to cleanup the nir code first

It's also important the shaders coming from the state tracker
for feedback get images lowered when they are draw shaders now.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10641>
2022-08-05 06:18:44 +00:00
Feng Jiang
060936fe0d virgl/vtest: fix memory overwrite problem in virgl_vtest_send_get_caps()
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17901>
2022-08-05 06:07:11 +00:00
Yiwei Zhang
f54aa49c14 venus: double the abort timeout to allow long shader compiles
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17898>
2022-08-05 04:47:39 +00:00
Yiwei Zhang
ecd5509969 venus: increase busy wait order in vn_relax
This is mainly to workaround a platform issue that has huge sleep
penalty, which could lead to a timeout if the small synchronous queries
are going to sleep.

This change adjusts the warn and abort order correspondingly so that to
match prior timing.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17898>
2022-08-05 04:47:39 +00:00
Mike Blumenkrantz
1911dc5abb zink: remove an old RGBA4 nvidia workaround
this should be automatically handled

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:05 +00:00
Mike Blumenkrantz
32446f51a8 zink: don't fixup sparse texops
this is broken, and these will never need to be fixed

Fixes: 3a47576687 ("zink: add a compiler pass to match up tex op dest types")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:05 +00:00
Mike Blumenkrantz
247b8f2924 zink: add all format modifiers when adding for dmabuf export
adding LINEAR before was a good starter step, but LINEAR
might not actually be supported (e.g., nvidia)

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:05 +00:00
Mike Blumenkrantz
5e8ec87b68 zink: don't add modifiers if EXT_image_drm_format_modifier isn't present
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
c824a53f35 zink: use modifier_aspect to check for modifier plane in zink_resource_get_param
cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
b59eb9c8b7 zink: demote dmabuf tiling to linear if modifiers aren't supported
this is effectively the same as LINEAR, and it still allows dmabuf creation

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
b9c413e8ec zink: add u_queue.h to kopper header
types are used, so include the header

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
188721d6d3 nine: check return on resource_get_handle
this has a return code, and if it return false, this is probably an
exit condition

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
b55b63991a zink: support PIPE_QUERY_TIMESTAMP_DISJOINT
the key point here is that disjoint is always false, but also return a handwavy
guess at frequency value based on timestampPeriod

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
758f60467e zink: export PIPE_CAP_MULTISAMPLE_Z_RESOLVE
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
0f97e317e3 zink: rewrite all undefined shader reads as 0001 instead of undef
this is a little less hostile towards broken/buggy apps

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
2bbc2c49ec zink: handle invalid gl_TexCoord reads
if a texcoord input is read in a fragment shader but not written in
the previous stage, the texcoord variable must be preserved until
nir_lower_texcoord_replace has (possibly) run, and only then can it
be replaced with a 0000 read

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
f60f246426 zink: explicitly set nir cursor in rewrite_and_discard_read
not sure if this is a bug but it looks weird

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
721f33cd0f zink: fix return for PIPE_CAP_DEPTH_CLIP_DISABLE
this uses the extension now

Fixes: 21ea19d504 ("zink: Always enable depth clamping, make depth clipping independent.")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
55a4a6b8dc zink: handle !half_pixel_center
the shader is already getting a -0.5,-0.5 bias, but the viewport also
needs to be shifted by 0.5 to match

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
8a8edb310d zink: handle unscaled depth bias from nine
nine uses this to pass unscaled units for depth bias, which means
the units must be scaled based on the format of the depth buffer

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
a912952c3e zink: drop mode_changed check from linewidth/depthbias draw updates
this doesn't need to be updated on primtype change since it's always
set

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
8f7b892957 zink: allow sw loading with D3D_ALWAYS_SOFTWARE for nine
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
cbbf25abfd zink: use maintenance4
just by enabling this there are fewer validation warnings

truly incredible.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
ff1fb9101f zink: force a new framebuffer for clear_depth_stencil if the clear region is big
can't clear outside the framebuffer, so set a new one if necessary

Fixes: f1f08e3529 ("zink: massively simplify zink_clear_depth_stencil")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Mike Blumenkrantz
80364c4d19 zink: force flush clears on fb change if fb geometry changes
Fixes: 66ceea7ed9 ("zink: lift clearing on fb state change up a level")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17775>
2022-08-05 03:51:04 +00:00
Connor Abbott
7c7feab4e1 tu: Implement VK_EXT_vertex_input_dynamic_state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17554>
2022-08-05 03:22:00 +00:00
Connor Abbott
c82af0c43b tu: Decouple vertex input state from shader
Emit VFD_DECODE and VFD_DEST separately, similarly to what Gallium does.
This means we emit a few more VFD_DECODE for binning shaders and when
there are unused attributes, but hopefully the overhead won't be too
much. In exchange we lose one draw state, and in the future we can
pre-compute the dynamic vertex state independently of the shader, so
there should be lower CPU overhead with dynamic vertex inputs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17554>
2022-08-05 03:22:00 +00:00
Rob Clark
35dc99924a freedreno: Disable UBWC for frontbuffer rendering
Note that glamor would still need to set this new
GBM_BO_USE_FRONT_RENDERING flag.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6865
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17799>
2022-08-05 00:57:38 +00:00
Rob Clark
0c6d4cf9a2 gbm: Add USE_FRONT_RENDERING flag
Provide a use flag to let the driver know that the allocated buffer will
be used for frontbuffer rendering.  For example, bandwidth compressed
formats should usually be avoided for frontbuffer rendering to avoid the
visual corruption that results from this display racing with the GPU
writing header data vs. pixel data.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17799>
2022-08-05 00:57:38 +00:00
Emma Anholt
126e83d970 ci/zink: Re-enable a630 zink-on-turnip traces job using gbm as the backend.
This is a workaround for #6753, without having to build and install a
custom xlib in our containers.  Maybe some day debian will have a
backport?

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17549>
2022-08-05 00:23:16 +00:00
Emma Anholt
a3113fbcfc zink: Replace the "optimal_tiling" flag with a "linear" flag instead.
That's what it actually means now.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17549>
2022-08-05 00:23:16 +00:00
Emma Anholt
01ce65da72 zink: Take the tiling path for resources with modifiers.
transfer_map (the only consumer of the flag now) was doing direct mapping
on resources with modifiers (UBWC compressed images on turnip) and
accessing them as linear.  We definitely want the staging blit path
instead.

Fixes glReadPixels() from gbm surfaces on turnip.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17549>
2022-08-05 00:23:16 +00:00
Karol Herbst
c1b0eb8de4 util/memstream: insert null terminator on windows
Libc's open_memstream is doing so on Unix systems already.

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/17334>
2022-08-04 23:53:50 +00:00
Karol Herbst
d1427563e3 gallium: mark the input data as const in pipe_grid_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>
2022-08-04 23:53:50 +00:00
Karol Herbst
caf2794f6f vtn: silence warning about linkage
For OpenCL kernels we simply link together SPIR-V files, so the only case
where we are left with linking shaders together is libclc and we handle
that just fine.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>
2022-08-04 23:53:50 +00:00
Karol Herbst
6637b1f41e clc: undefine spirv defs to work around LLVMs headers
Clang unconditionally adds those definitions if using a spirv LLVM target.

That's not a problem on its own, but clang's internal OpenCL header enable
a bunch of OpenCL extensions if those are set.

Lucky for us, we can simply undefine them and spare us the trouble of
finding an upstream solution to this problem :)

This fixes the OpenCL CTS' compiler features_macro test.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>
2022-08-04 23:53:50 +00:00
Karol Herbst
6b38114ed7 microsoft/clc: drop inline sampler reordering
nir_dedup_inline_samplers is now taking care of it.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>
2022-08-04 23:53:50 +00:00
Jason Ekstrand
de2065496a nir: Clean up and improve nir_dedup_inline_samplers
It now removes dead inline sampler variables and moves everything to the
end so we no longer need nir_move_inline_samplers_to_end().

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>
2022-08-04 23:53:50 +00:00
Karol Herbst
2b12985465 nir: extract the clc inline sampler dedup pass from clc
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>
2022-08-04 23:53:50 +00:00
Karol Herbst
31ed24cec7 nir/lower_images: extract from clover
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>
2022-08-04 23:53:50 +00:00
Karol Herbst
01500198a6 nir: serialize printf metadata for CL kernels
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>
2022-08-04 23:53:49 +00:00
Karol Herbst
bdc0a8624c printf: add some unit tests
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>
2022-08-04 23:53:49 +00:00
Karol Herbst
aa82808645 printf: extract clovers printf impl
Also make the code cleaner and simplier.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17334>
2022-08-04 23:53:49 +00:00
David Heidelberg
160aa603f5 ci/bin: ignore Gitlab GQL cache
Fixes: 266e3a627f ("ci/bin: Cache GQL queries")

Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17885>
2022-08-04 22:00:21 +00:00
Konstantin Seurer
12a4581a06 radv/nir_lower_abi: Use instructions_pass
nir_shader_instructions_pass is sufficient and it should be a bit faster
than nir_shader_lower_instructions.

Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17727>
2022-08-04 21:22:29 +00:00
Yonggang Luo
1b7b74db06 meson: Cleanup usage dri_drivers as it's a dead option
Initial value of with_dri have no relation with dri_drivers.length()
Do not show useless `DRI drivers:`

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17821>
2022-08-04 19:07:06 +00:00