Mike Blumenkrantz
071d335ca2
zink: tu a630 baseline update
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17606 >
2022-07-18 20:15:05 +00:00
Mike Blumenkrantz
b6df410d26
zink: nv baseline update
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17606 >
2022-07-18 20:15:05 +00:00
Adam Jackson
c123ab2137
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 >
2022-07-18 19:31:29 +00:00
Mike Blumenkrantz
81d83e81db
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 >
2022-07-18 19:31:28 +00:00
Yiwei Zhang
a211d74096
venus: filter out VK_EXT_physical_device_drm on the driver side
...
Fixes: a1a22862c6 ("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 >
2022-07-18 19:23:53 +00:00
Dave Airlie
50e3303b3d
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 >
2022-07-18 19:06:30 +00:00
Samuel Pitoiset
5ee5c73d2d
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
270cc39648
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
8d13392969
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
df8fb721a5
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
897561b7b9
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
d9ffff09b0
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
2784bfe93f
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
a6dff6caa1
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
8bdcc20815
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
0fd3754c26
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
a38db1a94e
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
0db7a0b6e8
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 >
2022-07-18 18:40:02 +00:00
Samuel Pitoiset
eee098486a
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 >
2022-07-18 18:40:02 +00:00
Ruijing Dong
a585d95803
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 >
2022-07-18 17:23:22 +00:00
Ruijing Dong
cd653e5cc7
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 >
2022-07-18 17:23:22 +00:00
Erik Faye-Lund
e630637eab
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 >
2022-07-18 17:10:52 +02:00
Erik Faye-Lund
e5da067384
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 >
2022-07-18 16:49:42 +02:00
Erik Faye-Lund
053e2fd9d0
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 >
2022-07-18 16:49:42 +02:00
Erik Faye-Lund
18c590e0b3
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 >
2022-07-18 16:49:42 +02:00
Erik Faye-Lund
141e715f29
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 >
2022-07-18 16:49:42 +02:00
Erik Faye-Lund
34b0828cdc
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 >
2022-07-18 16:49:42 +02:00
Erik Faye-Lund
8e9191cd24
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 >
2022-07-18 16:49:42 +02:00
Erik Faye-Lund
4d7403d4dc
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 >
2022-07-18 16:49:42 +02:00
Konstantin Seurer
0580910aa9
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 >
2022-07-18 12:05:35 +00:00
Qiang Yu
eeaf0b1888
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: e97f0463a8 ("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 >
2022-07-18 09:50:09 +00:00
Qiang Yu
0b7ef846b3
ac/nir/ngg: fix nogs culling scratch size
...
Should be in bytes not dwords.
Fixes: e97f0463a8 ("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 >
2022-07-18 09:50:09 +00:00
Timur Kristóf
5050db0b55
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 >
2022-07-18 08:23:41 +00:00
Timur Kristóf
b732285312
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 >
2022-07-18 08:23:41 +00:00
Mike Blumenkrantz
7ea7d0687b
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 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
ac38139c34
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 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
7754041ed6
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 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
b0e62adbcc
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 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
d8fa4e6797
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 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
66ceea7ed9
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 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
e81d6cec27
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 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
95f1c84739
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 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
631db579af
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 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
9d68684240
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: c132a28745 ("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 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
442281447a
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 >
2022-07-18 03:40:38 +00:00
Mike Blumenkrantz
d53395ad06
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 >
2022-07-18 03:40:37 +00:00
Mike Blumenkrantz
f1f08e3529
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 >
2022-07-18 03:40:37 +00:00
Mike Blumenkrantz
3488dc7dd0
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 >
2022-07-18 03:40:37 +00:00
Mike Blumenkrantz
c1cc2bd48e
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 >
2022-07-18 03:40:37 +00:00
Mike Blumenkrantz
04a5471b5e
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 >
2022-07-18 03:40:37 +00:00