# Pastebin GgJdFN4j diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 9101274b3a43..fcf3014ccf50 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -3733,7 +3733,8 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode, instr->dest_type = dest_type; nir_def_init(&instr->instr, &instr->def, - nir_tex_instr_dest_size(instr), 32); + nir_tex_instr_dest_size(instr), + nir_alu_type_get_type_size(dest_type)); vtn_assert(glsl_get_vector_elements(ret_type->type) == nir_tex_instr_result_size(instr));