Commit Graph

38587 Commits

Author SHA1 Message Date
Daniel Stone cdb7a3b0e2 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>
2022-07-16 11:44:26 +00:00
Arvind Yadav 1fbc7337a1 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>
2022-07-16 07:08:33 -04:00
Arvind Yadav 25204d89a6 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>
2022-07-16 10:15:22 +00:00
Emma Anholt a43b96ab1a ci/crocus: Drop xfails for the recent image external fix.
Fixes: 8856379a03 ("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>
2022-07-16 04:31:56 +00:00
Emma Anholt c0930b552d ci/crocus: Disable the blender trace.
It gives inconsistent sha1s.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17572>
2022-07-16 04:31:56 +00:00
Emma Anholt f96688fec2 ci/crocus: Update portal 2 trace shas for the recent fix.
they render correctly now.

Fixes: 4e797ac530 ("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>
2022-07-16 04:31:56 +00:00
Mike Blumenkrantz 56e5eaeba1 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>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz bd2eaaeb7d 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>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz 924145c7b5 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>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz c189b7f585 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: 31ba19ff68 ("zink: fix ntv partial stores")

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17404>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz 5245290565 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>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz 042cc6e6e6 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>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz 76cc519866 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>
2022-07-15 17:32:27 +00:00
Mike Blumenkrantz a0771cd4ab 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>
2022-07-15 17:32:27 +00:00
Jesse Natalie e14beaf05b 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>
2022-07-15 16:27:11 +00:00
Mike Blumenkrantz b1c1d099a9 zink: always update sampler descriptor layouts on fb surface unbind
this will affect the layout

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17524>
2022-07-15 14:20:24 +00:00
Mike Blumenkrantz f79d71f59e zink: break out samplerview layout reset code
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17524>
2022-07-15 14:20:24 +00:00
Mike Blumenkrantz 960a6316d4 zink: use sampler_bind_count to simplify some code
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17524>
2022-07-15 14:20:24 +00:00
Mike Blumenkrantz 3a47576687 zink: add a compiler pass to match up tex op dest types
this handles bitsize conversions and depth component splatting to
enable simplifying some of the related ntv code

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17427>
2022-07-15 14:08:56 +00:00
Mike Blumenkrantz 49d5fa12f2 zink: always use 32bit sample ops
while some (tg4) sample ops can use different bit sizes in spirv, most
cannot, and all the shader variables are always emitted as 32bit, so
ensure the 32bit type is always what's being used for sampling

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17427>
2022-07-15 14:08:56 +00:00
Mike Blumenkrantz 35a4b8989f zink: allow multiple tex components for depth tg4
this returns a vec4, so don't break the return type by clamping 1 component

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17427>
2022-07-15 14:08:56 +00:00
Daniel Stone 02d9d1557b CI: Disable Collabora lab
It's everyone's favourite day, infrastructure maintenance Friday.

This includes manual disables for a618-vk and zink-anv-tgl, because
apparently the disable-on-variable rules don't carry through to those
jobs for ... some reason.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17553>
2022-07-15 13:26:42 +00:00
Lucas Stach 612b99d721 etnaviv: fix use after free in async shader compile
When the shader state is destroyed before the async shader compile is
done, we get a use after free in the async thread, as the shader state
it is operating on is gone. Fix this by dropping any pending job from
the async queue or wait for it to finish before destroying the state
by calling util_queue_drop_job.

Also call util_queue_fence_destroy, which would have caught this issue
by asserting that the queue_fence is in signalled state when the
shader state is destroyed.

Fixes: 1141ed5859 ("etnaviv: async shader compile")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17534>
2022-07-15 11:07:12 +00:00
Brian Paul a0ea45fb68 llvmpipe: initialize a local var to fix compiler warning in release build
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Brian Paul dfb2ea3531 llvmpipe: don't allow texture/resource swizzles on linear path
This fixes another VMware test (dx9-stretch-formats-copy-a8r8g8b8-x8r8g8b8).

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Brian Paul c9fd8abe50 llvmpipe: replace LP_RAST_OP_ #defines with enum type
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Brian Paul 90d011de8e llvmpipe: fix texcoord analysis in llvmpipe_nir_fn_is_linear_compat()
For the linear rendering fast path, we need to know whether the
texcoord argument to tex instructions comes directly from an FS input
(swizzling OK, but no arithmetic, etc).  Use the input register info
to fill in the tex_info object.

This is part of a fix for some linear rendering bugs.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Brian Paul c6f9a91015 llvmpipe: fix invalid memory used in lp_fs_linear_run
We were saving the address of the constants[] and nir_constants[]
arrays in the jit structure.  But those arrays went out of scope
before use.

This patch moves the constants[] array to the function scope and
consolidates the TGSI/NIR paths.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Brian Paul 3743f74d30 llvmpipe: add missing tex_info->texture_unit assignment
The texture_unit field needs to be set like the sampler_unit field.

Also, add a swizzle initialization and some comments.

Signed-off-by: Brian Paul <brianp@vmare.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Brian Paul 53cd3f331f llvmpipe: replace GET_A0() macro w/ inline function
And GET_DADX(), GET_DADY(), GET_PLANES().  This is a bit more
readable, making the expected parameter types explicit.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Brian Paul 2d4473c2ac llvmpipe: replace if/then with switch in llvmpipe_nir_fn_is_linear_compat()
To simplify the logic a bit.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Brian Paul 36c22b5dfb llvmpipe: minor code re-org in lp_state_fs_analysis.c
And add comments.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Brian Paul 938767e835 llvmpipe: add simple assertion in generate_fragment()
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Brian Paul 3f0a6c7ac1 llvmpipe: remove lp_rast_cmd_arg::state field
Use the existing 'set_state' field.  Some code was using 'state'
and other code was using 'set_state'.  It didn't really matter
since lp_rast_cmd_arg is a union, but this removes some potential
confusion.

Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Brian Paul 4d5d7d16dc llvmpipe: add minor comments in lp_rast.h, lp_setup-rect.c
Signed-off-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
2022-07-14 19:16:07 +00:00
Lionel Landwerlin 2cac3b3817 anv: ensure tile flush before streamout writes
Streamout is not L3 coherent so previous writes to the same address
might be pending and overwrite the SO writes later when they get
flushed from L3, even though the SO write happened later in the batch.

v2: Use the right flag (not COUNTER)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6680
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17503>
2022-07-14 18:28:52 +00:00
Connor Abbott 67c9ca2319 tu: Use incoherent CCU write for buffer accesses
Unlike image writes, buffer writes may access the same memory in
different ways, which we've seen in the past can cause problems. Use an
incoherent access to force flush/invalidate between accesses to the same
buffer, unless we know the barrier applies to images only.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17193>
2022-07-14 17:23:39 +00:00
Boyuan Zhang 3962555db8 radeonsi/vcn: use calculated max hierarchy depth for hevc enc
Certain player has hard coded max_transform_hierarchy_depth_inter and
max_transform_hierarchy_depth_intra values set through VA-API, which
doesn't work on radeon HW. Until properly fixing it on player side,
temporarily adding this workaround to use calculated values instead.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17489>
2022-07-14 14:23:02 +00:00
Jesse Natalie 4845bc7072 zink: Use p_atomic_fetch_add
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17529>
2022-07-14 12:49:51 +00:00
Yogesh Mohan Marimuthu 1c2ca3cfb7 radeonsi: no need to call si_pm4_clear_state() in si_pm4_free_state()
the si_pm4_clear_state() initializes the variable in struct si_pm4_state which
anyway gets freed in si_pm4_free_state(). Hence no need to call
si_pm4_clear_state() in si_pm4_free_state().

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17504>
2022-07-14 10:30:09 +00:00
Yogesh Mohan Marimuthu 2330c71751 radeonsi: remove tabs from code
v2: fix indentation after if (Marek Olšák)

Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17504>
2022-07-14 10:30:09 +00:00
Jesse Natalie 333432310a d3d12: Fix up resource import validation
Format on buffers is irrelevant and bind flag validation needs to be disabled.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
2022-07-14 03:45:17 +00:00
Jesse Natalie d119e6a46f d3d12: Implement fence opening and value setting
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
2022-07-14 03:45:17 +00:00
Jesse Natalie ea243ef1d5 d3d12: Implement server signal/wait
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
2022-07-14 03:45:17 +00:00
Jesse Natalie 416f10fc3f d3d12: Support importing fences / timeline semaphores
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
2022-07-14 03:45:17 +00:00
Jesse Natalie e3e22ce882 d3d12: Support opening resources and memobj by name
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
2022-07-14 03:45:17 +00:00
Jesse Natalie d462325895 d3d12: Implement resource_from_memobj
If the memobj wraps a resource, then we only succeed the
mapping operation if the gallium desc matches the D3D12
resource desc.

If the memobj wraps a heap, then we can place whatever
gallium is describing on the heap.

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
2022-07-14 03:45:17 +00:00
Jesse Natalie bd0407a4a6 d3d12: Support creating memory objects
They can wrap either an opened heap or resource

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
2022-07-14 03:45:17 +00:00
Jesse Natalie c87d7cfaad d3d12: PIPE_BIND_SHARED doesn't mean linear and is always on opened resources
Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
2022-07-14 03:45:17 +00:00
Jesse Natalie e02b11af57 d3d12: Get adapter LUID after device creation
Otherwise it's only set if the GL frontend gave us one

Reviewed-by: Bill Kristiansen <billkris@microsoft.com>
Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17446>
2022-07-14 03:45:17 +00:00