ac/nir: add resinfo lowering for sliced storage 3D views
The first layer isn't necessarily 0 and depth shouldn't be minified. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21359>
This commit is contained in:

committed by
Marge Bot

parent
806f146eea
commit
e82c11df66
@@ -167,6 +167,17 @@ lower_query_size(nir_builder *b, nir_ssa_def *desc, nir_src *lod,
|
||||
}
|
||||
}
|
||||
|
||||
/* Special case for sliced storage 3D views which shouldn't be minified. */
|
||||
if (gfx_level >= GFX10 && has_depth) {
|
||||
nir_ssa_def *uav3d =
|
||||
nir_ieq_imm(b, get_field(b, desc, 5, ~C_00A014_ARRAY_PITCH), 1);
|
||||
nir_ssa_def *layers_3d =
|
||||
nir_isub(b, get_field(b, desc, 4, ~C_00A010_DEPTH),
|
||||
get_field(b, desc, 4, ~C_00A010_BASE_ARRAY));
|
||||
layers_3d = nir_iadd_imm(b, layers_3d, 1);
|
||||
depth = nir_bcsel(b, uav3d, layers_3d, depth);
|
||||
}
|
||||
|
||||
nir_ssa_def *result = NULL;
|
||||
|
||||
/* Construct the result. */
|
||||
|
Reference in New Issue
Block a user