mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 03:28:09 +02:00
radv: use nir_ssa_undef() for unused image components in meta shaders
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/12561>
This commit is contained in:
parent
f741c04ed1
commit
c89616c98d
3 changed files with 3 additions and 3 deletions
|
|
@ -933,7 +933,7 @@ build_nir_cleari_compute_shader(struct radv_device *dev, bool is_3d, int samples
|
|||
comps[0] = nir_channel(&b, global_id, 0);
|
||||
comps[1] = nir_channel(&b, global_id, 1);
|
||||
comps[2] = layer;
|
||||
comps[3] = nir_imm_int(&b, 0);
|
||||
comps[3] = nir_ssa_undef(&b, 1, 32);
|
||||
global_id = nir_vec(&b, comps, 4);
|
||||
|
||||
for (uint32_t i = 0; i < samples; i++) {
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ build_fmask_expand_compute_shader(struct radv_device *device, int samples)
|
|||
|
||||
nir_ssa_def *img_coord =
|
||||
nir_vec4(&b, nir_channel(&b, tex_coord, 0), nir_channel(&b, tex_coord, 1),
|
||||
nir_channel(&b, tex_coord, 2), nir_imm_int(&b, 0));
|
||||
nir_channel(&b, tex_coord, 2), nir_ssa_undef(&b, 1, 32));
|
||||
|
||||
for (uint32_t i = 0; i < samples; i++) {
|
||||
nir_ssa_def *outval = &tex_instr[i]->dest.ssa;
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ build_depth_stencil_resolve_compute_shader(struct radv_device *dev, int samples,
|
|||
}
|
||||
|
||||
nir_ssa_def *coord = nir_vec4(&b, nir_channel(&b, img_coord, 0), nir_channel(&b, img_coord, 1),
|
||||
nir_channel(&b, img_coord, 2), nir_imm_int(&b, 0));
|
||||
nir_channel(&b, img_coord, 2), nir_ssa_undef(&b, 1, 32));
|
||||
nir_image_deref_store(&b, &nir_build_deref_var(&b, output_img)->dest.ssa, coord,
|
||||
nir_ssa_undef(&b, 1, 32), outval, nir_imm_int(&b, 0),
|
||||
.image_dim = GLSL_SAMPLER_DIM_2D, .image_array = true);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue