brw/vec4: Don't convert tex dest type to glsl_type
We were using nir_tex_instr::dest_type to a glsl_type, then passing it to emit_texture(), only to just check the number of components. Just pass the number of components directly. This lets us delete brw_glsl_base_type_for_nir_type, which was asserting with nir_texop_all_samples_equal because it didn't handle bool32. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7989>
This commit is contained in:
@@ -827,7 +827,7 @@ vec4_visitor::is_high_sampler(src_reg sampler)
|
||||
void
|
||||
vec4_visitor::emit_texture(ir_texture_opcode op,
|
||||
dst_reg dest,
|
||||
const glsl_type *dest_type,
|
||||
int dest_components,
|
||||
src_reg coordinate,
|
||||
int coord_components,
|
||||
src_reg shadow_comparator,
|
||||
@@ -964,7 +964,7 @@ vec4_visitor::emit_texture(ir_texture_opcode op,
|
||||
emit(MOV(dst_reg(MRF, param_base + 1, type, WRITEMASK_YW), lod2));
|
||||
inst->mlen++;
|
||||
|
||||
if (dest_type->vector_elements == 3 || shadow_comparator.file != BAD_FILE) {
|
||||
if (dest_components == 3 || shadow_comparator.file != BAD_FILE) {
|
||||
lod.swizzle = BRW_SWIZZLE_ZZZZ;
|
||||
lod2.swizzle = BRW_SWIZZLE_ZZZZ;
|
||||
emit(MOV(dst_reg(MRF, param_base + 2, type, WRITEMASK_X), lod));
|
||||
|
Reference in New Issue
Block a user