Jason Ekstrand [Mon, 4 Oct 2021 19:13:33 +0000 (14:13 -0500)]
anv: Rename a fail label in CreateDevice
The rest of them are labeled with the thing they need to destroy first,
not the thing that failed.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Jason Ekstrand [Mon, 4 Oct 2021 20:14:29 +0000 (15:14 -0500)]
vulkan/pipeline_cache: Add helpers for storing NIR in the cache
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Jason Ekstrand [Sat, 2 Oct 2021 08:38:28 +0000 (03:38 -0500)]
vulkan: Add a common VkPipelineCache implementation
This is partly copied+pasted from ANV but is mostly new code with lots
of reference counting bugs fixed (I hope!). The new cache caches
"object" which derive from a base vk_pipeline_class_object struct. It
uses a kernel-style "ops" interface for virtual methods on these objects
to allow for easy destruction (when the reference count hits zero) as
well as serialization an deserialization interfaces. This should allow
drivers to cache basically whatever they want without having to think
too hard about the details.
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Jason Ekstrand [Mon, 4 Oct 2021 21:36:23 +0000 (16:36 -0500)]
util/set: Respect found in search_or_add_pre_hashed
Fixes:
491e7decad0f "util/set: add the found param to search_or_add"
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Jason Ekstrand [Mon, 4 Oct 2021 16:58:33 +0000 (11:58 -0500)]
util/blob: Add align helpers
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13184>
Marek Olšák [Fri, 22 Apr 2022 06:16:23 +0000 (02:16 -0400)]
ac/surface: fix an addrlib race condition on gfx9
Addrlib calls GetMetaEquation, which generates and saves address equations
in a global table that is not thread safe.
Fixes:
df2cbdd2e32 - amd/addrlib: expose DCC address equations to drivers
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6361
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16091>
Marek Olšák [Fri, 22 Apr 2022 05:35:45 +0000 (01:35 -0400)]
nir: fix an uninitialized variable valgrind warning in nir_group_loads
pass_flags is only initialized for grouped loads, so change the order
Fixes:
33b4eb149ea - nir: add new SSA instruction scheduler grouping loads into indirection groups
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16090>
Pierre-Eric Pelloux-Prayer [Wed, 20 Apr 2022 09:09:40 +0000 (11:09 +0200)]
ac/surface: adjust gfx9.pitch[*] based on surf->blk_w
This is the same as
8275dc1ed57, but since gfx9.pitch[...] is
used for linear surfaces since
86262b6eac0 we need to update
it as well.
Fixes:
86262b6eac0 ("radeonsi,radv: fix usages of surf_pitch")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16053>
Dylan Baker [Wed, 16 Mar 2022 20:12:09 +0000 (13:12 -0700)]
util: remove simple_list
Down to two invasive linked list implementations in Mesa!
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Mar 2022 20:10:46 +0000 (13:10 -0700)]
llvmpipe: replace uses of simple_list.h with list.h
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Mar 2022 21:17:07 +0000 (14:17 -0700)]
llvmpipe: cleanup trailing whitespace
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Tue, 22 Feb 2022 20:07:51 +0000 (12:07 -0800)]
gallium/draw: use list.h instead of simple_list.h
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Mar 2022 21:15:04 +0000 (14:15 -0700)]
gallium/draw: remove trailing whitespace
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Feb 2022 22:55:51 +0000 (14:55 -0800)]
gallium/util/u_cache: replace simple_list.h with list.h
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Mar 2022 21:12:33 +0000 (14:12 -0700)]
gallium/util/u_cache.c: remove trailing whitespace
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Mar 2022 18:19:49 +0000 (11:19 -0700)]
util/list.h: add a function to move an item in a list
This allows for a 1:1 replacement of simple_list move_to_head (though
I've tried to make this function more generally useful.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Feb 2022 22:46:42 +0000 (14:46 -0800)]
gallium/driver_trace: remove simple_list.h
Which isn't actually used
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Feb 2022 22:45:43 +0000 (14:45 -0800)]
gallium/rbug: replace simple_list.h with list.h
Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Feb 2022 22:26:09 +0000 (14:26 -0800)]
r300: remove unused simple_list.h
It's unused, so let's not include it.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Dylan Baker [Wed, 16 Feb 2022 22:25:07 +0000 (14:25 -0800)]
winsys/radeon: remove unused simple_list.h
It's not used, so let's not include it.
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15418>
Mike Blumenkrantz [Wed, 20 Apr 2022 19:53:35 +0000 (15:53 -0400)]
zink: add synchronization for buffer clears
cc: mesa-stable
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16098>
Mike Blumenkrantz [Thu, 21 Apr 2022 14:09:34 +0000 (10:09 -0400)]
zink: fix stride=0 for dynamic state vertex stride checking
this case shouldn't trigger the fully-baked fallback since it's
legal with dynamic state
Fixes:
1eada1b02d3 ("zink: selectively disable dynamic vertex stride")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16098>
Illia Abernikhin [Mon, 4 Apr 2022 13:37:28 +0000 (16:37 +0300)]
vulkan/runtime: repair thread safety in method vk_queue_start_submit_thread()
Accessing queue->submit.thread_run without holding lock vk_queue.submit.mutex.
Elsewhere, vk_queue.submit.thread_run is accessed with vk_queue.mutex
held 1 out of 2 times (1 of these accesses strongly imply that it is necessary).
Found by Coverity.
CID: 1503334
Signed-off-by: Illia Abernikhin <illia.abernikhin@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15736>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 11:43:39 +0000 (13:43 +0200)]
ac/spm: setup write broadcasting correctly
Based on PAL's PerfExperiment::BuildGrbmGfxIndex method.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 08:23:40 +0000 (10:23 +0200)]
radeonsi: make sure profile_peak is used before using sqtt
Using sqtt without this profile can cause hangs.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 12:37:01 +0000 (14:37 +0200)]
radeonsi/sqtt: enable spm counters on gfx10+
Tested on:
- navi10: L0 cache counter doesn't work (always 0)
- sienna_cichlid: L0 doesn't work (always 0) and L1 isn't visible in RGP
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 12:36:26 +0000 (14:36 +0200)]
radeonsi/sqtt: setup spm bo
The hardware will write SPM counters to this bo.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 12:30:53 +0000 (14:30 +0200)]
radeonsi: add spm counters setup code
Based on radv_spm.c and PAL.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 12:14:34 +0000 (14:14 +0200)]
radeonsi: add helpers to deal with spm counters
Based on radv_perfcounter.c
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Pierre-Eric Pelloux-Prayer [Tue, 29 Mar 2022 12:13:30 +0000 (14:13 +0200)]
radeonsi: make si_pc_emit_shaders non static
Also pass "cs" as a param to allow updating a specific cs.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
Boris Brezillon [Thu, 7 Apr 2022 13:49:00 +0000 (06:49 -0700)]
dzn: Add KHR_draw_indirect_count support
Unfortunately it's not as simple as passing the indirect draw count
buffer to ExecuteIndirect. The compute job that populate the execute
buffer also needs to know the number of entries that need to be
patched. Instead of transitioning the indirect count buffer from
GENERIC_READ to INDIRECT_ARGUMENT we just keep at as a read-only
resource and copy the draw_count value to the exec buffer in the
compute job.
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15914>
Boris Brezillon [Wed, 6 Apr 2022 16:25:54 +0000 (18:25 +0200)]
dzn: Allow multiDrawIndirect and drawIndirectFirstInstance
Those are already supported, let's just toggle the switch.
Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15914>
Juan A. Suarez Romero [Thu, 21 Apr 2022 14:26:39 +0000 (16:26 +0200)]
v3dv: duplicate key on hashtable insert
The key is created on stack, so as soon as the function returns this key
is lost, so the inserted key in the hashtable is invalid.
Rather, insert a duplicated version on heap.
This fixes a stack-buffer-overflow when running some Vulkan CTS tests.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16083>
Juan A. Suarez Romero [Thu, 21 Apr 2022 07:49:07 +0000 (09:49 +0200)]
gallium: move get_canonical_format hook to pipe_screen
pipe_context shouldn't have functions that return values because this
prevent multithreading.
Move this hook to pipe_screen.
Fixes:
606e42027e6 ("gallium: add hook on getting canonical format")
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16078>
Boris Brezillon [Wed, 20 Apr 2022 09:45:33 +0000 (02:45 -0700)]
dzn: Get rid of the render pass logic
The core provides generic render-pass -> dynamic-rendering wrappers,
so let's rely on them instead of implementing our own logic.
Suggested-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Tue, 12 Apr 2022 13:01:10 +0000 (15:01 +0200)]
dzn: Add support for dynamic rendering
This is how D3D12 works, so nothing really complicated here. We just
add a bunch of states to the render state, patch the pipeline building
logic to support dynamic rendering, and add new functions to
Suggested-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Wed, 20 Apr 2022 08:56:44 +0000 (10:56 +0200)]
dzn: Inline dzn_cmd_buffer_clear_attachments()
It's only called from dzn_CmdClearAttachments(), so let's move the
code there.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Wed, 20 Apr 2022 08:36:10 +0000 (01:36 -0700)]
dzn: Move all render-related states to a substruct
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Wed, 20 Apr 2022 08:23:58 +0000 (10:23 +0200)]
dzn: Set MAX_RTS to D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT
D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT == 8, so no functional change
here, it's just cleaner to use the D3D12 definition.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Wed, 20 Apr 2022 08:12:06 +0000 (10:12 +0200)]
dzn: Pass an image view to dzn_cmd_buffer_clear_attachment()
Let the caller extract the image view from the attachment index, so
we can make this function framebuffer-agnostic and re-use it in the
dynamic rendering path.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15913>
Boris Brezillon [Wed, 6 Apr 2022 16:25:20 +0000 (18:25 +0200)]
dzn: Advertise KHR_shader_draw_parameters
We already pass those parameters to shaders, so let's advertise the
feature.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15912>
Boris Brezillon [Wed, 6 Apr 2022 16:23:37 +0000 (18:23 +0200)]
dzn: Update the draw_id sysval when issuing indirect draws
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15912>
Boris Brezillon [Wed, 6 Apr 2022 15:30:33 +0000 (17:30 +0200)]
dzn: Simplify the triangle_fan_rewrite_index shader
We don't need the first_vertex argument when turning non-indexed
triangle-fan draws into indexed triangle-list ones, the firstVertex
argument can simply be passed as a vertexOffset.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15912>
Boris Brezillon [Wed, 6 Apr 2022 15:25:14 +0000 (17:25 +0200)]
dzn: Fix exec_buf_stride calculation
The stride depends on the indirect draw arguments which are different if
triangle-fan emulation is required.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15912>
Boris Brezillon [Wed, 6 Apr 2022 08:24:33 +0000 (01:24 -0700)]
microsoft/spirv_to_dxil: Add a draw_id field to vertex_runtime_data
So we can support the draw_id system value.
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15912>
Samuel Pitoiset [Thu, 21 Apr 2022 10:41:27 +0000 (12:41 +0200)]
radv: only apply enable_mrt_output_nan_fixup for 32-bit float MRTs
This is incorrect for 32-bit integer MRTs which are clamped to the
maximum value of the format, and returning 0 can break some shaders.
This fixes a rendering issue with RAGE2.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4329
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16080>
Dylan Baker [Fri, 22 Apr 2022 04:32:46 +0000 (21:32 -0700)]
docs: update calendar for 22.1.0-rc2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16089>
Dylan Baker [Fri, 22 Apr 2022 04:32:45 +0000 (21:32 -0700)]
docs: update calendar for 22.1.0-rc1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16089>
Dylan Baker [Fri, 22 Apr 2022 04:31:58 +0000 (21:31 -0700)]
docs: update calendar and link releases notes for 22.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16089>
Dylan Baker [Fri, 22 Apr 2022 04:31:09 +0000 (21:31 -0700)]
docs: Add sha256sums for 22.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16089>
Dylan Baker [Fri, 22 Apr 2022 04:03:38 +0000 (21:03 -0700)]
docs: add release notes for 22.0.2
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16089>
Mike Blumenkrantz [Fri, 15 Apr 2022 13:58:58 +0000 (09:58 -0400)]
zink: fix memory_barrier intrinsic
matching glsang behavior here
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15959>
Mike Blumenkrantz [Fri, 15 Apr 2022 13:58:48 +0000 (09:58 -0400)]
zink: always use vk mem model for shaders if available
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15959>
Mike Blumenkrantz [Thu, 14 Apr 2022 18:30:21 +0000 (14:30 -0400)]
zink: use vulkan memory model shader semantics for tcs barriers
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15959>
Mike Blumenkrantz [Thu, 14 Apr 2022 18:30:09 +0000 (14:30 -0400)]
zink: hook up VK_KHR_vulkan_memory_model
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15959>
Mike Blumenkrantz [Thu, 14 Apr 2022 18:28:43 +0000 (14:28 -0400)]
zink: fix semantics mask for compute control barriers
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15959>
Mike Blumenkrantz [Thu, 14 Apr 2022 18:19:02 +0000 (14:19 -0400)]
zink: fix tcs control barriers for use without vk memory model
these are translated into memory+control barriers in nir, and only
the control barrier needs to be handled
these semantics match what glslang does, so they must be right
cc: mesa-stable
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15959>
Sidney Just [Thu, 21 Apr 2022 19:55:38 +0000 (12:55 -0700)]
wgl: support kopper
this is semi transposed from the dri version of kopper and mostly ignores
what wgl tries to do in order to let zink drive everything
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16068>
Sidney Just [Wed, 20 Apr 2022 21:50:39 +0000 (17:50 -0400)]
zink: support win32 wsi
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16068>
Sidney Just [Wed, 20 Apr 2022 21:49:59 +0000 (17:49 -0400)]
kopper: add win32 loader interface
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16068>
Sidney Just [Wed, 20 Apr 2022 21:48:30 +0000 (17:48 -0400)]
zink: support VK_KHR_win32_surface
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16068>
Sidney Just [Wed, 20 Apr 2022 21:47:58 +0000 (17:47 -0400)]
wgl: add zink to the list of auto-loaded drivers
it's a legitimate driver!
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16068>
Sidney Just [Wed, 20 Apr 2022 21:47:22 +0000 (17:47 -0400)]
wgl: add a flag to determine if running on zink
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16068>
Mike Blumenkrantz [Thu, 14 Apr 2022 12:43:33 +0000 (08:43 -0400)]
zink: add a stencil blit fallback path
nvidia doesn't support stencil exports, so this is necessary to handle
stencil-only blits
fixes #6316
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16071>
Mike Blumenkrantz [Thu, 14 Apr 2022 12:42:57 +0000 (08:42 -0400)]
zink: rework clear_depth_stencil hook
u_blitter works great, but it doesn't handle recursion, so only use
it as a last resort
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16071>
Mike Blumenkrantz [Thu, 14 Apr 2022 13:09:35 +0000 (09:09 -0400)]
zink: make update_framebuffer_state() public
this is useful
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16071>
Mike Blumenkrantz [Thu, 14 Apr 2022 12:13:09 +0000 (08:13 -0400)]
zink: make unsupported blit formats an error
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16071>
Paulo Zanoni [Wed, 9 Feb 2022 20:56:35 +0000 (12:56 -0800)]
iris: fix race condition during busy tracking
The Iris code that deals with implicit tracking is protected by
bufmgr->bo_deps_lock. Before this patch, we hold this lock during
update_batch_syncobjs() but don't keep it held until we actually
submit the batch in the execbuf ioctl. This can lead to the following
race condition:
- Context C1 generates a batch B1 that signals syncobj S1.
- Context C2 generates a batch B2 that depends on something that B1
from C1 is using, so we mark B2 as having to wait syncobj S1.
- C2 calls submit_batch() before C1 does it.
- The Kernel detects it was told to wait on syncobj S1 that was
never even submitted, so it returns EINVAL to the execbuf ioctl.
- We run abort() at the end of _iris_batch_flush().
- If DEBUG is defined, we also print:
iris: Failed to submit batchbuffer: Invalid argument
I couldn't figure out a way to reproduce this issue with real
workloads, but I was able to write a small reproducer to trigger this.
Basically it's a little GL program that has lots of contexts running
in different threads submitting compute shaders that keep using the
same SSBOs. I'll submit this as a piglit test. Edit: Tapani found a
dEQP test case which fails intermintently without this fix, so I'm not
sure a new Piglit is worth it now.
The solution itself is quite simple: just keep bo_deps_lock held all
the way from update_batch_syncobjs() until ioctl(). In order to make
that easier we just call update_batch_syncobjs() a little later. We
have to drop the lock as soon as the ioctl returns because removing
the references on the buffers would trigger other functions to try to
grab the lock again, leading to deadlocks.
Thanks to Kenneth Graunke for pointing out this issue.
This has also been confirmed to fix a dEQP test that was giving
intermittent failures:
dEQP-EGL.functional.sharing.gles2.multithread.random.images.copyteximage2d.12
v2: Move decode_batch() out, just to be safe (Jason).
v3: Do it all after assembling validation_list (Ken).
Cc: mesa-stable
Fixes:
89a34cb8450a ("iris: switch to explicit busy tracking")
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14964>
Yonggang Luo [Tue, 19 Apr 2022 08:49:44 +0000 (16:49 +0800)]
zink: Improve zink.rst with links
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16026>
Yonggang Luo [Tue, 19 Apr 2022 08:39:52 +0000 (16:39 +0800)]
zink: Trim spaces in zink.rst
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16026>
Mike Blumenkrantz [Thu, 21 Apr 2022 19:13:09 +0000 (15:13 -0400)]
wgl: support GL 4.6
somehow we never supported anything above 4.5?
cc: mesa-stable
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16085>
Mike Blumenkrantz [Wed, 20 Apr 2022 19:32:05 +0000 (15:32 -0400)]
zink: move the kopper present fence to the displaytarget object
this is otherwise broken when front/back buffers share the same dt
Fixes:
8ade5588e39 ("zink: add kopper api")
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16070>
Emma Anholt [Tue, 21 Dec 2021 00:31:54 +0000 (16:31 -0800)]
virgl: Switch to nir-to-tgsi by default.
With !8044 all TGSI drivers will end up going through the nir-to-tgsi
path, so make the switch now that CI is happy (which will also make sure
that future NTT work doesn't break virgl).
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13295>
Emma Anholt [Tue, 19 Apr 2022 23:21:02 +0000 (16:21 -0700)]
tgsi: Extend array lengths when merging usage_masks.
With nir-to-tgsi, virgl saw a case where a previous declaration of array
.x and scalar .y (turning into an array with .xy) ended up being a
declaration of scalar .x and array .y (turning into a scalar with .xy).
Make sure we extend the declared array length as well.
One might think that the fix would be to union the .first/.last between
the two declarations being merged, but note that ureg_DECL_output() passes
in the current nr_output_regs as the index, so the .last would end up
getting extended for those callers (such as nir_to_tgsi fs outputs) every
time you merged.
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13295>
Emma Anholt [Fri, 8 Apr 2022 19:24:22 +0000 (12:24 -0700)]
nir_to_tgsi: Lower FS input array indexing since we don't declare input arrays.
We can't declare input arrays because mesa/st lowers NIR VS output
declarations to elements no matter what, and virgl has depended on
matching array sizes of declarations between producers and consumers. So,
we have to lower it away (which is fine because hardware drivers will
generally be lowering anyway).
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13295>
Gert Wollny [Sun, 17 Apr 2022 15:22:27 +0000 (17:22 +0200)]
virgl: Clear all indirect flags when writing to a temporary
The output may be an array, e.g. with a TCS shader, so if the
value is written to a temporaray first remove the indirect
indicator for that write.
Fixes:
36f12c85c84364d7f1ea797512462e7c7e47a260
virgl: Extend integer write out output fix to all non-move integers ops
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13295>
Lionel Landwerlin [Thu, 21 Apr 2022 08:00:23 +0000 (11:00 +0300)]
nir/divergence: handle load_global_block_intel
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes:
dd39e311b336 ("nir: Add nir_intrinsic_{load,store}_deref_block_intel")
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16075>
Gert Wollny [Wed, 20 Apr 2022 10:04:26 +0000 (12:04 +0200)]
ntt: Split 64 bit vec3 and vec4 local variables and phis
Fixes virgl with with ntt:
spec@arb_enhanced_layouts@execution@component-layout@vs-fs-array-dvec3
spec@arb_gpu_shader_fp64@uniform_buffers@fs-array-copy
spec@arb_gpu_shader_fp64@uniform_buffers@gs-array-copy
spec@arb_gpu_shader_fp64@uniform_buffers@vs-array-copy
spec@arb_gpu_shader_fp64@execution@gs-fs-vs-double
spec@arb_gpu_shader_fp64@execution@built-in-functions@fs-frexp-dvec4-variable-index
spec@arb_gpu_shader_fp64@execution@explicit-location-gs-fs-vs
spec@arb_gpu_shader_fp64@execution@built-in-functions@fs-frexp-dvec4-variable-index
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15945>
Gert Wollny [Wed, 13 Apr 2022 15:57:06 +0000 (17:57 +0200)]
nir: Add pass to split 64 bit vec3 and vec4 variable access and phis
NTT can't convert local 64 variables of type vec3 or vec4, therefore,
they need to be split into vec2 + double or vec2 + vec2.
At the same time deal splitting the phi nodes.
The pass goes into the global namespace because it is also useful
for r600.
v2: only lower function_temps (Emma) and handle array of arrays (Jason)
v3: - remove bool parameter in function to merge
vec3 and vec4
- simplify load/store_deref_(array|var)
- use a pointer hash table
- simplify PHI splitting (all Emma)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15945>
Filip Gawin [Sun, 23 Jan 2022 16:41:43 +0000 (17:41 +0100)]
r300: Print warning when stubbing derivatives
Fixes:
e1c640c3a43d741719864b35cbf855aa82be0611
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14669>
Daniel Stone [Thu, 21 Apr 2022 15:12:24 +0000 (16:12 +0100)]
ci/zink: Add glx-tfp to skips
glx-tfp is broken since Kopper, and periodically either fails or
crashes; we seemingly can't quite deal with the change between the two.
Just skip it for now.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16082>
Martin Roukala (né Peres) [Thu, 24 Mar 2022 13:18:00 +0000 (15:18 +0200)]
radv/ci: add a Van Gogh dEQP runner
Vangogh is the codename of the custom APU found in the Steam Deck.
As it only has 4 Zen2 cores and a 15W TDP, don't expect fast runs
until we get more of them in CI :)
Just like the Renoir and one of the NAVI10 runners, this VanGogh
runner is hosted in my CI farm, behind a couple of UPSes.
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Charlie Turner <cturner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15555>
Martin Roukala (né Peres) [Thu, 14 Apr 2022 12:34:21 +0000 (15:34 +0300)]
ci/b2c: update b2c to enable monitoring support
By enabling monitoring, we can collect all kind of metrics such as
CPU/Memory/Disk usage during execution, allowing us to detect
bottlenecks.
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Charlie Turner <cturner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15555>
Martin Roukala (né Peres) [Thu, 14 Apr 2022 12:49:37 +0000 (15:49 +0300)]
ci/b2c: bump the kernel to 5.17.1
This new kernel also brings support for sensors, which makes will
enable us to monitor metrics during the execution of tests.
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Charlie Turner <cturner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15555>
Martin Roukala (né Peres) [Tue, 19 Apr 2022 07:08:13 +0000 (10:08 +0300)]
ci/b2c: fix the generation of the IMAGE_UNDER_TEST variable
The `IMAGE_UNDER_TEST` variable set in `.b2c-test` got broken with
the merge of 7d474c1 (ci: Move most stuff out of root .gitlab-ci.yml).
During the shuffling, the `MESA_BASE_TAG` and `MESA_IMAGE_TAG`
variables were dropped, leading to `IMAGE_UNDER_TEST` being an
unexisting container.
To make this issue less likely to happen in the future, this patch
drops the code duplication that led to `IMAGE_UNDER_TEST` to be
the same as `MESA_IMAGE` and instead re-uses .use-debian/x86_test-vk
to generate `MESA_IMAGE`, which we then use verbatim in
`IMAGE_UNDER_TEST`.
The renaming is `MESA_IMAGE` into `IMAGE_UNDER_TEST` there to make the
distinction clear between the image run by gitlab-runner (what is
usually called `MESA_IMAGE` but we instead hardcode to valve-infra's
trigger container), and the image we are running on the test machines.
Fixes: 7d474c1 (ci: Move most stuff out of root .gitlab-ci.yml)
Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Reviewed-by: Charlie Turner <cturner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15555>
Yonggang Luo [Thu, 31 Mar 2022 07:34:08 +0000 (15:34 +0800)]
misc: replace `#ifdef\s\s__cplusplus` with `#ifdef\s__cplusplus`
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15762>
Yonggang Luo [Thu, 31 Mar 2022 07:32:36 +0000 (15:32 +0800)]
misc: Replace `#ifdef\t__cplusplus` with `#ifdef\s\s__cplusplus`
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15762>
Erik Faye-Lund [Tue, 19 Apr 2022 06:21:08 +0000 (08:21 +0200)]
nir/lower_int64: do not try to clamp floats to int-range
The clamping isn't correct, because the exact values ended up getting
rounded off a bit when converting back to floats.
But, converting floats to integers have undefined results when the
float value doesn't fit in the integer. So let's not try to clamp the
value here.
This was caught by digging at a Clang warning, see this thread for
details:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15547#note_1329769
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16022>
Alexey Bozhenko [Wed, 13 Apr 2022 12:16:16 +0000 (15:16 +0300)]
spirv: fix OpBranchConditional when both branches are the same
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6246
Signed-off-by: Bozhenko Alexey <oleksii.bozhenko@globallogic.com>
Fixes:
64cb143b922 ("spirv: Fix handling of OpBranchConditional with same THEN and ELSE")
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15929>
Dave Airlie [Thu, 21 Apr 2022 00:23:11 +0000 (10:23 +1000)]
util/stencil: fix stencil fallback blit shader texture types.
src/gallium/auxiliary/tgsi/tgsi_scan.c:287: scan_src_operand: Assertion `info->sampler_targets[index] == target' failed.
assert was being triggered by
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_multisampled_to_singlesampled_blit
using the stencil fallback with zink.
Fixes:
f05dfddeb1ad ("u_blitter: fix stencil blit fallback for crocus.")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16069>
Dave Airlie [Wed, 20 Apr 2022 23:49:31 +0000 (09:49 +1000)]
u_blitter/stencil: take dstbox x/y into accounts for dst fb width
When setting the dst framebuffer width height, it might be silly
to constrain this beyond the dst resource, but at least constrain
it correctly to take account of x/y offsets.
This fixes some uses of this as a fallback for zink with
GTF-GL46.gtf30.GL3Tests.framebuffer_blit.framebuffer_blit_functionality_stencil_blit
Fixes:
b4c07a8a87d0 ("gallium/util: allow scaling blits for stencil-fallback")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16069>
Frank Binns [Wed, 13 Apr 2022 11:02:17 +0000 (12:02 +0100)]
pvr: replace p_compiler.h boolean with stdbool
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16037>
Daniel Stone [Wed, 20 Apr 2022 21:16:44 +0000 (22:16 +0100)]
ci/windows: Eliminate duplicate script definition
We already get this from the base we extend from.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16077>
Daniel Stone [Wed, 20 Apr 2022 21:15:10 +0000 (22:15 +0100)]
ci: Also disable Windows container builds when down
Unlike all the other test configurations, we also want to drop the
Windows container build when our Windows machines aren't available.
Missed in !16055.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16077>
Daniel Stone [Thu, 21 Apr 2022 10:30:27 +0000 (11:30 +0100)]
ci: Allow lima jobs to be globally disabled
This is useful in situations like right now, where the boards are dead.
Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16077>
Erik Faye-Lund [Wed, 20 Apr 2022 16:33:04 +0000 (18:33 +0200)]
dzn: remove stale cpp_args
We no longer use C++, so we don't need to set cpp_args here.
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16076>
Erik Faye-Lund [Wed, 20 Apr 2022 10:50:14 +0000 (12:50 +0200)]
dzn: fixup indent
This seems to be all tab-indents we have in our code-base.
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16076>
Erik Faye-Lund [Wed, 20 Apr 2022 10:50:04 +0000 (12:50 +0200)]
dzn: drop needless enum-casts
After rewriting to C, we also don't need these casts.
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16076>
Vadym Shovkoplias [Thu, 14 Apr 2022 18:52:47 +0000 (21:52 +0300)]
anv: Fix geometry flickering issue when compute and 3D passes are combined
Call flush_pipeline_select_3d in CmdBeginRendering() to emit a dummy MEDIA_VFE_STATE
before switching from GPGPU to 3D.
Original commit with the fix:
bc612536 ("anv: Emit a dummy MEDIA_VFE_STATE before switching from GPGPU to 3D")
Fixes:
3501a3f9ed92 ("anv: Convert to 100% dynamic rendering")
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6201
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15954>
Erik Faye-Lund [Tue, 12 Apr 2022 14:55:03 +0000 (16:55 +0200)]
dzn: add space before += operator
Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16052>