amd/common: use ac_image_load when lod is zero
This might decrease VGPR spilling, because we no longer have to use v4i32 for 2D fetches when level == 0. We now use v2i32 for those cases. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
@@ -2252,7 +2252,9 @@ static LLVMValueRef build_tex_intrinsic(struct ac_nir_context *ctx,
|
||||
case nir_texop_txf:
|
||||
case nir_texop_txf_ms:
|
||||
case nir_texop_samples_identical:
|
||||
args->opcode = instr->sampler_dim == GLSL_SAMPLER_DIM_MS ? ac_image_load : ac_image_load_mip;
|
||||
args->opcode = lod_is_zero ||
|
||||
instr->sampler_dim == GLSL_SAMPLER_DIM_MS ?
|
||||
ac_image_load : ac_image_load_mip;
|
||||
args->compare = false;
|
||||
args->offset = false;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user