Emma Anholt [Thu, 14 Jul 2022 18:33:19 +0000 (11:33 -0700)]
freedreno/ir3: Enable core NIR's 16-bit ALU optimizations.
In addition to hopefully generating shorter code, this optimizes out a
comparison of a mediump-cast value in
dEQP-GLES2.functional.shaders.algorithm.rgb_to_hsl_fragment passed
through ANGLE, and allows the test to pass. We believe it to be a
test bug, but emitting better code like apparently everyone else does
is also a fine result.
No change on GLES gfxbench shaders.
Fixes: #6585
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17546>
Konstantin Seurer [Wed, 13 Jul 2022 12:20:36 +0000 (14:20 +0200)]
vulkan: Common vk_format_get_component_bits
RADV and PowerVR use the same implementation.
Turnip does use a slightly modified version but the helper only has one
use -> just inline it and get rid of turnip's vk_format.h.
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17515>
jheaff1 [Sun, 17 Jul 2022 22:04:23 +0000 (23:04 +0100)]
build(glx): Fix build by adding missing deps
dri3_glx.c includes xshmfence and glxcmds.c includes xf86vm, neither of
which are listed as dependencies of the glx lib in the meson.build file.
Consequently, those files would fail to compile on machines that did not
have xshmfence and xf86vm installed globally. This commit rectifies the
issue by adding the missing dependencies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17585>
Mike Blumenkrantz [Tue, 12 Jul 2022 17:57:31 +0000 (13:57 -0400)]
mesa/st: add implicit zeroing of clipdistance array
GL drivers have an implicit default of "in bounds" for unwritten clipdistance
values, but some (layered) drivers have to deal with api mismatch which
prevents that implicit value from being used after the shader
gets mangled by various compiler passes
to avoid issues here, write out all members of the clipdistance array
with zeroes at the very start of the shader such that any values the
shader actually writes will naturally overwrite the implicit zero and
any unwritten values will now be written as zero
fixes #6845
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17498>
Mike Blumenkrantz [Wed, 13 Jul 2022 22:00:13 +0000 (18:00 -0400)]
zink: tu a630 baseline update
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17606>
Mike Blumenkrantz [Wed, 13 Jul 2022 22:00:04 +0000 (18:00 -0400)]
zink: nv baseline update
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17606>
Adam Jackson [Tue, 12 Jul 2022 18:26:15 +0000 (14:26 -0400)]
kopper: Implement {EGL,GLX}_EXT_buffer_age
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17527>
Mike Blumenkrantz [Fri, 15 Jul 2022 12:26:04 +0000 (08:26 -0400)]
zink: break out tc/trace context unwrapping
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17527>
Yiwei Zhang [Mon, 18 Jul 2022 04:48:29 +0000 (04:48 +0000)]
venus: filter out VK_EXT_physical_device_drm on the driver side
Fixes:
a1a22862c62 ("venus: implement VK_EXT_physical_device_drm")
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/17591>
Dave Airlie [Thu, 14 Jul 2022 00:34:04 +0000 (10:34 +1000)]
kms/dri: add mutex lock around map/unmap
this can get called from multiple threads with the recent llvmpipe
overlapping rendering changes, so make sure to lock around the
map/unmapping so they can't race.
This should fixes some crashes seen with kwin.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tested-by: Adam Williamson (Fedora)
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17531>
Samuel Pitoiset [Thu, 14 Jul 2022 16:54:20 +0000 (18:54 +0200)]
radv: implement PS epilogs
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/17485>
Samuel Pitoiset [Thu, 14 Jul 2022 16:53:46 +0000 (18:53 +0200)]
aco: add support for compiling PS epilogs
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/17485>
Samuel Pitoiset [Fri, 15 Jul 2022 06:28:58 +0000 (08:28 +0200)]
aco: refactor export_fs_mrt_color() for PS epilogs preparation
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/17485>
Samuel Pitoiset [Tue, 12 Jul 2022 09:24:23 +0000 (11:24 +0200)]
radv,aco: rename radv_aco_build_prolog to radv_aco_build_shader_part
Will be re-used for PS epilogs.
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/17485>
Samuel Pitoiset [Fri, 24 Jun 2022 14:17:07 +0000 (16:17 +0200)]
aco: add aco_postprocess_shader() helper
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/17485>
Samuel Pitoiset [Fri, 24 Jun 2022 12:38:59 +0000 (14:38 +0200)]
aco: prevent adding DONE/VM to the last export if the FS has an epilog
If the fragment shader exports MRTZ and the epilog some color exports,
DONE/VM should be added to the last export.
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/17485>
Samuel Pitoiset [Fri, 24 Jun 2022 12:39:10 +0000 (14:39 +0200)]
aco: do not abort if the FS doesn't export anything but has an epilog
The main fragment shader can only export MRTZ (if present) and the
epilog will export colors.
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/17485>
Samuel Pitoiset [Fri, 24 Jun 2022 14:03:52 +0000 (16:03 +0200)]
aco: emit p_jump_to_epilog if the main fragment shader has an epilog
MRTZ is still exported from the main shader.
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/17485>
Samuel Pitoiset [Fri, 24 Jun 2022 12:17:29 +0000 (14:17 +0200)]
aco: add new pseudo instruction p_jump_to_epilog
The first operand of this new pseudo-instruction is a 64-bit SGPR for
the continue PC, followed by a variable list of fixed VGPRS for the
color exports which are the PS epilog inputs.
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/17485>
Samuel Pitoiset [Fri, 17 Jun 2022 14:28:31 +0000 (16:28 +0200)]
radv: add a function that declares PS epilog shader arguments
The PS epilog would be a "normal" compiled shader using RA, etc. It
will declare up to 8x4 VGPRs for all color exports.
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/17485>
Samuel Pitoiset [Fri, 17 Jun 2022 14:22:18 +0000 (16:22 +0200)]
radv: declare a new user SGPR arg in FS for the epilog PC
The main FS would have to jump to the PC of the PS epilog. Given that
shaders are allocated in the 32-bit addr space, one user SGPR is fine.
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/17485>
Samuel Pitoiset [Fri, 17 Jun 2022 14:27:33 +0000 (16:27 +0200)]
radv,aco: introduce {radv,aco}_ps_epilog_key
To pass the necessary pipeline information for compiling PS epilogs.
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/17485>
Samuel Pitoiset [Fri, 17 Jun 2022 14:26:32 +0000 (16:26 +0200)]
radv,aco: track if a fragment shader needs an epilog
This is currently disabled but it will be used for testing first,
and then for graphics pipeline libraries.
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/17485>
Ruijing Dong [Tue, 12 Jul 2022 18:40:19 +0000 (14:40 -0400)]
frontends/va: WA for ffmpeg 10bit encoding crash
When doing 10bit encoding in ffmpeg it uses
VaDeriveImage, and that could result in missing
mapping the chroma buffer of the input frame.
This WA to disallow ffmpeg using VaDeriveImage
function, so that VaCreateImage and VaPutImage can
be used and WA the chroma buffer mapping issue.
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17472>
Ruijing Dong [Tue, 12 Jul 2022 13:42:58 +0000 (09:42 -0400)]
frontends/va: do texture_map when needed
When map buffer, and its target is texture,
texture_map/unmap need to be used.
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17472>
Erik Faye-Lund [Mon, 13 Jun 2022 11:48:22 +0000 (13:48 +0200)]
dzn: expose VK_KHR_driver_properties
We're not quite conformant with the extension, because we don't have
a valid conformance version.
That's not a quick-fix, so we should probably just accept some failures
for now.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16998>
Erik Faye-Lund [Mon, 13 Jun 2022 12:37:27 +0000 (14:37 +0200)]
dzn: fill misc props
This is just a bag of misc properties that we should fill in.
Not all of them are filled out super accurately, but this is the best we
can do for now.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16998>
Erik Faye-Lund [Mon, 13 Jun 2022 12:37:05 +0000 (14:37 +0200)]
dzn: fill in minmax props
This should be possible to support, but we don't support minmax blending
at all yet, so let's leave these as unsupported for now.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16998>
Erik Faye-Lund [Mon, 13 Jun 2022 12:33:35 +0000 (14:33 +0200)]
dzn: fill in depth/stencil resolve props
Before enabling Vulkan 1.2 support, we need to fix the TODO in here.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16998>
Erik Faye-Lund [Mon, 13 Jun 2022 12:29:42 +0000 (14:29 +0200)]
dzn: fill in bindless props
These might not be exactly right, but they are good enough for now.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16998>
Erik Faye-Lund [Mon, 13 Jun 2022 12:09:12 +0000 (14:09 +0200)]
dzn: fill in non-uniform-indexing props
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16998>
Erik Faye-Lund [Mon, 13 Jun 2022 12:03:46 +0000 (14:03 +0200)]
dzn: fill in float-control details
We can do better here in the future, but this is what's supported right
now.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16998>
Erik Faye-Lund [Mon, 13 Jun 2022 11:47:51 +0000 (13:47 +0200)]
dzn: fill in driver name and info
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16998>
Konstantin Seurer [Sun, 17 Jul 2022 09:20:23 +0000 (11:20 +0200)]
radv: Only set rt stack size for dynamic stacks
When using a static callable stack, the required scratch has already
been allocated.
Dynamic stacks are located at the end of scratch memory
and are allocated on demand using radv_set_rt_stack_size.
Static stacks live at the start of scratch memory and are allocated in
create_rt_shader by setting scratch_size.
Signed-off-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Reviewed-By: Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17579>
Qiang Yu [Tue, 28 Jun 2022 08:18:21 +0000 (16:18 +0800)]
ac/nir/ngg: add a barrier before prim id export
When culling enabled, it will use LDS space, which overlap with
the prim id export.
Fixes:
e97f0463a8f ("ac/nir: Implement NGG deferred attribute culling in NIR.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17593>
Qiang Yu [Thu, 7 Jul 2022 11:40:48 +0000 (19:40 +0800)]
ac/nir/ngg: fix nogs culling scratch size
Should be in bytes not dwords.
Fixes:
e97f0463a8f ("ac/nir: Implement NGG deferred attribute culling in NIR.")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17593>
Timur Kristóf [Sun, 17 Jul 2022 16:02:57 +0000 (18:02 +0200)]
radv: Remove trailing whitespace introduced by DGC commits.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17580>
Timur Kristóf [Sun, 17 Jul 2022 16:01:34 +0000 (18:01 +0200)]
radv: Only initialize DGC state when DGC is enabled.
This function causes a crash with RADV_DEBUG=llvm and this commit
works around that crash.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17580>
Mike Blumenkrantz [Wed, 13 Jul 2022 16:17:29 +0000 (12:17 -0400)]
zink: inject a 0,0,0,1 clear for RGBX formats
this ensures the alpha component is full if it must be read for fbfetch
fixes (RGBX swapchain config):
KHR-GL46.blend_equation_advanced*
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Wed, 6 Jul 2022 14:38:42 +0000 (10:38 -0400)]
zink: simplify zink_framebuffer_clear_data union
no functional changes
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Wed, 6 Jul 2022 14:37:33 +0000 (10:37 -0400)]
zink: delete srgb tracking for clears
no longer used
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Wed, 6 Jul 2022 14:35:03 +0000 (10:35 -0400)]
zink: delete zink_fb_clear_util_unpack_clear_color
no longer used
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Wed, 6 Jul 2022 12:46:38 +0000 (08:46 -0400)]
zink: remove out-of-renderpass clears
these are only ever going to hurt tiler perf, so remove the footgun
this also means there's no more srgb format conversion needed, so delete
all of that too
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Wed, 6 Jul 2022 18:24:27 +0000 (14:24 -0400)]
zink: lift clearing on fb state change up a level
in the scenario where:
* at least 1 color buffer was bound and a depth buffer was bound
* no color clear was enabled
* a zs clear was enabled
* the zs clear was never flushed
* the zs clear needs a renderpass
* the fb state changes
the color buffer(s) would be unbound, following which the depth buffer unbind
would trigger a renderpass, which would utilize the just-unbound color buffers,
which have no batch tracking, thus creating a case where the surface was destroyed
while it was still in use
cc: mesa-stable
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Fri, 8 Jul 2022 14:49:54 +0000 (10:49 -0400)]
zink: clamp color clear values based on format
formats like GL_RGB10_A2UI can be cleared with out of range values,
so to ensure consistent driver behavior, pre-clamp to the valid range
affects:
KHR-GL46.direct_state_access.renderbuffers_storage_multisample
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Fri, 8 Jul 2022 15:47:56 +0000 (11:47 -0400)]
zink: add explicit (awful) handling for fb layer mismatch clears
this is terrible and (hopefully?) rare, so just force it out early to
avoid any kind of issue
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Fri, 8 Jul 2022 15:35:39 +0000 (11:35 -0400)]
zink: track a bitmask of fb attachments with mismatched layer counts
these need special handling for clears
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Fri, 8 Jul 2022 12:29:03 +0000 (08:29 -0400)]
zink: always use storeOp=STORE for depth renderpass
it's unknown whether there may be clears to the depth attachment at the start of
a renderpass, so always assume there will be
Fixes:
c132a287455 ("zink: use store op NONE when necessary for depth usage")
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Wed, 6 Jul 2022 12:43:56 +0000 (08:43 -0400)]
zink: remove u_blitter usage from zink_clear_render_target
this is more operations than needed
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Wed, 6 Jul 2022 12:40:50 +0000 (08:40 -0400)]
zink: remove non-renderpass clear path from zink_clear_texture
this should always be faster
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Wed, 6 Jul 2022 12:39:44 +0000 (08:39 -0400)]
zink: massively simplify zink_clear_depth_stencil
this now just uses renderpass clears
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Wed, 6 Jul 2022 12:29:30 +0000 (08:29 -0400)]
zink: improve zink_clear_depth_stencil check for current attachment
this is technically more correct since it accounts for multi-context usage
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Tue, 5 Jul 2022 19:44:28 +0000 (15:44 -0400)]
zink: stop using u_blitter for texture clears
this was really stupid: instead of just binding a new fb and firing off
a clear, the code was calling u_blitter to bind a new fb and do actual
draws
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Tue, 5 Jul 2022 19:40:29 +0000 (15:40 -0400)]
zink: fix coverage check for texture clears
this wasn't actively harmful, but it was potentially differently-performant
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Tue, 5 Jul 2022 19:28:27 +0000 (15:28 -0400)]
zink: remove format check from clear texture
this is going to be a render target no matter what
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Fri, 15 Jul 2022 13:15:37 +0000 (09:15 -0400)]
zink: fix transient attachment rp assert
cc: mesa-stable
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Mike Blumenkrantz [Tue, 5 Jul 2022 19:27:21 +0000 (15:27 -0400)]
zink: remove bogus range tracking from texture clear
too much copy/paste
Acked-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17366>
Dave Airlie [Sun, 17 Jul 2022 23:00:01 +0000 (09:00 +1000)]
lavapipe: enable variablePointers
This passes the CTS with no regressions.
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17587>
Dave Airlie [Sun, 17 Jul 2022 22:58:47 +0000 (08:58 +1000)]
lavapipe: drop unreachable pNext checks.
These are reachable, and
dEQP-VK.api.smoke.triangle_ext_structs,Crash is why.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17586>
Mihai Preda [Wed, 13 Jul 2022 11:33:39 +0000 (14:33 +0300)]
gallium: LLVM-15 contexts use non-opaque pointers
LLVM-15 enables opaque pointers by default. We temporarilly request
non-opaque pointers while we migrate our code to support non-opaque pointers.
This workaround needs to be removed before LLVM-16.
See #6615
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17514>
Rob Clark [Wed, 29 Jun 2022 16:34:00 +0000 (09:34 -0700)]
freedreno/gmem: Reverse order of alternative tile rows
Similar motivation as
c426e21ff14 ("turnip: Reverse the order of walking
pipes or tiles on odd rows."), but instead we just swap the order of
alternate rows of fd_tile the the gmem stateobj.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17303>
Daniel Stone [Fri, 15 Jul 2022 15:27:44 +0000 (16:27 +0100)]
Revert "CI: Disable Collabora lab"
This reverts commit
7a336c97ef692ed96cc93394596a7d0650983874.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17563>
Arvind Yadav [Tue, 22 Feb 2022 16:07:35 +0000 (21:37 +0530)]
radeonsi: Enable nir_lower_point_smooth lowering pass for point smoothing
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15117>
Arvind Yadav [Tue, 22 Feb 2022 16:05:58 +0000 (21:35 +0530)]
ac/llvm: Implement nir_intrinsic_load_point_coord_maybe_flipped opcodes
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15117>
Arvind Yadav [Thu, 5 May 2022 07:31:11 +0000 (13:01 +0530)]
ac/llvm : Adding Number of all interpolated inputs in ac_shader_abi
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15117>
Arvind Yadav [Tue, 22 Feb 2022 16:02:42 +0000 (21:32 +0530)]
nir: Add a lowering pass for point smoothing
When point smoothing is enabled then this lowering pass will
modifies the alpha component of every write to fragment output.
Anti-aliased points get rounded with respect to their radius instead
of square.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15117>
Arvind Yadav [Fri, 25 Feb 2022 07:14:36 +0000 (12:44 +0530)]
nir: add load_point_coord_maybe_flipped intrinsics for point smoothing
gl_PointCoord can be flipped upside down via a state.
To avoid this adding new load_point_coord_maybe_flipped intrinsics.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15117>
Arvind Yadav [Fri, 29 Apr 2022 12:30:36 +0000 (18:00 +0530)]
radeonsi: Add nir_lower_poly_line_smooth pass for polygon and line smoothing
Added a new NIR pass for handling polygon and line smoothing and
Removed previous smoothing changes.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16245>
Arvind Yadav [Fri, 29 Apr 2022 12:28:02 +0000 (17:58 +0530)]
nir: Add a lowering pass for polygon and line smoothing
When poly_line smoothing is enabled then this lowering pass will
modify the alpha component of every write to fragment output
using sample coverage mask.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16245>
Emma Anholt [Sun, 10 Jul 2022 04:09:13 +0000 (21:09 -0700)]
ci/crocus: Drop xfails for the recent image external fix.
Fixes:
8856379a030b ("mesa/st: don't guess the internal format if it's known")
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17572>
Emma Anholt [Sun, 10 Jul 2022 04:08:03 +0000 (21:08 -0700)]
ci/crocus: Disable the blender trace.
It gives inconsistent sha1s.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17572>
Emma Anholt [Sun, 10 Jul 2022 04:07:25 +0000 (21:07 -0700)]
ci/crocus: Update portal 2 trace shas for the recent fix.
they render correctly now.
Fixes:
4e797ac530b0 ("st/glsl: fix broken vertex attrib mapping")
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17572>
Emma Anholt [Wed, 13 Jul 2022 19:51:14 +0000 (12:51 -0700)]
mesa/arbprog: Stop doing optimization in the ARB program IR.
You'll get all this and more anyway once you're in NIR. This lets us GC a
bunch more ARB program transformation code.
No effect in shader-db on softpipe.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17528>
Emma Anholt [Wed, 13 Jul 2022 19:45:47 +0000 (12:45 -0700)]
mesa/arbprog: Use nir_lower_io_to_temporaries.
This replaces our mesa_remove_output_reads(), which in turn GCs some other
ARB program transformation code.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17528>
Emma Anholt [Wed, 13 Jul 2022 19:29:30 +0000 (12:29 -0700)]
mesa/arbprog: Move the GLSLFragCoordIsSysVal handling to prog_to_nir.
We don't need to go grubbing around in the ARB program when we can use the
right variable type at prog_to_nir time. This does leave
fp->system_values_read/inputs_read as they were, but I don't see anywhere
that that matters (the NIR will have its info gathered appropriately, and
other lowering may also cause mismatch between the gl_program and the
NIR).
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17528>
Jesse Natalie [Fri, 8 Jul 2022 18:16:44 +0000 (11:16 -0700)]
util: Add a Win32 futex impl
This uses APIs that are not available on Win7. Since this is a build-time
configuration, and since we can't use the SDK version as an indicator
(since you can support Win7 via new SDKs), a new option is added to allow
disabling it, to maintain Win7 support if desired.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17431>
Yiwei Zhang [Tue, 12 Jul 2022 06:31:37 +0000 (06:31 +0000)]
venus: add more tracepoints for perf analysis
This change adds the tracepoints that can help understand app behavior
for debugging and performance optimization purposes.
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/17497>
Yiwei Zhang [Tue, 12 Jul 2022 06:13:27 +0000 (06:13 +0000)]
venus: suballocate more for layering
Previously we suballocate only for host visible memory type to reduce
the kvm mem slot usage. That is no longer an issue given the limit has
been raised. However, we should still suballocate to make layering
clients performant. So we just suballocate regardless of mem type.
This change also increases the allowed suballocation size request from
64K to 128K, which makes layering clients happier.
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/17497>
naveen [Tue, 21 Jun 2022 00:31:12 +0000 (00:31 +0000)]
github/ci: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.
- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: David Heidelberg <david@ixit.cz>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17562>
Mike Blumenkrantz [Mon, 11 Jul 2022 12:44:00 +0000 (08:44 -0400)]
mesa: update GL_CLAMP emulation when binding/unbinding textures
binding/unbinding a texture affects the previously specified parameters,
so ensure the driver flag for clamp emulation is also set to perform
updates as needed
Fixes:
e8f71f6ac48 ("mesa/st: add PIPE_CAP_GL_CLAMP")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17459>
Mike Blumenkrantz [Mon, 11 Jul 2022 19:27:37 +0000 (15:27 -0400)]
mesa: track which sampler wrap params use GL_CLAMP
this adds a bitmask to sampler objects for tracking whether GL_CLAMP
is active
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17459>
Mike Blumenkrantz [Thu, 14 Jul 2022 14:54:49 +0000 (10:54 -0400)]
mesa: move is_wrap_gl_clamp() to samplerobj.h and deduplicate
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17459>
Mike Blumenkrantz [Fri, 8 Jul 2022 13:52:30 +0000 (09:52 -0400)]
zink: fix xfb emit check in compiler
nir->info.has_transform_feedback_varyings is set for all stages in the
pipeline when xfb is present, so it can't be used for this
harmless, but this is more correct
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
Mike Blumenkrantz [Thu, 7 Jul 2022 18:09:52 +0000 (14:09 -0400)]
zink: add a compiler pass to split xfb block outputs
this splits all the members of a struct into separate variables to
improve xfb inlining and reduce the number of locations consumed by
xfb outputs, reducing the chances of running out of shader outputs
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
Mike Blumenkrantz [Thu, 14 Jul 2022 02:18:27 +0000 (22:18 -0400)]
zink: bitcast extracted streamout components to uint before creating uvec
spirv can't create a uvec from float components, so pre-cast here
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
Mike Blumenkrantz [Thu, 14 Jul 2022 01:52:48 +0000 (21:52 -0400)]
zink: use right glsl length getter for ntv partial stores
why does glsl_get_length exist if it returns 0 for the most common cases?
Fixes:
31ba19ff681 ("zink: fix ntv partial stores")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
Mike Blumenkrantz [Fri, 8 Jul 2022 13:14:25 +0000 (09:14 -0400)]
zink: fix xfb array inlining
get_slot_components() returns the total number of output components
for arrays for initial evaluation phase, but during the packed->inlined
conversion the arrayed size must be normalized to the slot's component count
in order to effectively catch and inline the array
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
Mike Blumenkrantz [Thu, 7 Jul 2022 18:09:10 +0000 (14:09 -0400)]
zink: split xfb block emission from array/matrix handling
these are not necessarily the same case even if in glsl they are the same,
and by splitting it out a bunch of redundant array[scalar] code can be deleted
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
Mike Blumenkrantz [Thu, 7 Jul 2022 18:08:09 +0000 (14:08 -0400)]
zink: handle bare matrix types in xfb emission
these have no inherent slot index since they aren't block members
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
Mike Blumenkrantz [Thu, 7 Jul 2022 18:07:30 +0000 (14:07 -0400)]
zink: always use 32bit floats for so output types
doubles may be the output variable type, but the xfb output will always
be 32bit
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
David Heidelberg [Tue, 21 Jun 2022 23:12:29 +0000 (01:12 +0200)]
ci: Allow disabling the whole of the Igalia farm
Add a global-level variable that allows disabling all jobs that would
have gone to the Igalia lab, to be used in case of outages or failures.
Reviewed-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Andres Gomez <agomez@igalia.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17178>
Jesse Natalie [Thu, 14 Jul 2022 21:55:14 +0000 (14:55 -0700)]
CI: Update DirectX-Headers dependency for MinGW/Debian
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
Jesse Natalie [Thu, 14 Jul 2022 21:54:54 +0000 (14:54 -0700)]
subprojects: Point DirectX-Headers at a specific tag
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
Jesse Natalie [Thu, 14 Jul 2022 21:54:34 +0000 (14:54 -0700)]
microsoft/clc: Add helpers to build with correct ABI for MinGW
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
Jesse Natalie [Thu, 14 Jul 2022 21:54:18 +0000 (14:54 -0700)]
d3d12: Add helpers to build with correct ABI for MinGW
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
Jesse Natalie [Thu, 14 Jul 2022 21:58:25 +0000 (14:58 -0700)]
dzn: Remove the cast when the SDK version is high enough
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
Jesse Natalie [Thu, 14 Jul 2022 16:37:25 +0000 (09:37 -0700)]
dzn: Missed ABI fixes for GetCustomHeapProperties
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17548>
Eric Engestrom [Wed, 13 Jul 2022 17:53:22 +0000 (18:53 +0100)]
docs/isl: fix typos & formatting
Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17522>
Tatsuyuki Ishi [Thu, 14 Jul 2022 12:23:50 +0000 (21:23 +0900)]
radv: Only set pstate for the first hw_ctx.
We used to do it for every queue, which was duplicate work as pstate is
per-device. It could also cause trouble when multiple hw_ctx are created as
the call will succeed for only one of them and the rest will return -EBUSY.
Simplify and fix this by only setting for the first non-null hw_ctx.
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17541>
Bas Nieuwenhuizen [Fri, 7 Jan 2022 11:02:11 +0000 (12:02 +0100)]
radv: Expose VK_NV_device_generated_commands.
Closes: #6736
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17269>