mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
ac/surface: Filter swizzle modes for VCN
This will allow compatible swizzle modes to be picked for RADV (radeonsi filters modifiers when creating video surfaces). This mirrors the logic from ac_modifier_supports_video, and in addition ensures that XOR swizzle modes are disabled for image arrays because VCN does not support slice indices. Reviewed-by: David Rosca <david.rosca@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40948>
This commit is contained in:
parent
713cecb1df
commit
fcaab2b921
1 changed files with 14 additions and 0 deletions
|
|
@ -2017,6 +2017,20 @@ static int gfx9_get_preferred_swizzle_mode(struct ac_addrlib *addrlib, const str
|
|||
sin.forbiddenBlock.gfx11.thick256KB = 1;
|
||||
}
|
||||
|
||||
if (surf->flags & (RADEON_SURF_DECODE_DST | RADEON_SURF_ENCODE_SRC)) {
|
||||
assert(info->vcn_ip_version >= VCN_2_0_0);
|
||||
|
||||
/* Only "S" swizzle modes supported */
|
||||
if (info->vcn_ip_version < VCN_3_0_0) {
|
||||
sin.preferredSwSet.value = 0;
|
||||
sin.preferredSwSet.sw_S = 1;
|
||||
}
|
||||
|
||||
/* Video cannot support XOR modes for image arrays */
|
||||
if (in->numSlices > 1)
|
||||
sin.noXor = 1;
|
||||
}
|
||||
|
||||
ret = Addr2GetPreferredSurfaceSetting(addrlib->handle, &sin, &sout);
|
||||
if (ret != ADDR_OK)
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue