pan/mdg: Set texture full fields at pack time

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793>
This commit is contained in:
Alyssa Rosenzweig
2020-04-27 19:22:06 -04:00
committed by Marge Bot
parent 4fb02174a3
commit 08af4c788d
2 changed files with 9 additions and 5 deletions
-5
View File
@@ -1762,11 +1762,6 @@ emit_texop_native(compiler_context *ctx, nir_tex_instr *instr,
.format = midgard_tex_format(instr->sampler_dim),
.texture_handle = texture_index,
.sampler_handle = sampler_index,
/* TODO: half */
.in_reg_full = 1,
.out_full = 1,
.sampler_type = midgard_sampler_type(instr->dest_type),
.shadow = instr->is_shadow,
}
+9
View File
@@ -474,6 +474,15 @@ emit_binary_bundle(compiler_context *ctx,
ins->texture.mask = ins->mask;
mir_pack_swizzle_tex(ins);
unsigned osz = nir_alu_type_get_type_size(ins->dest_type);
unsigned isz = nir_alu_type_get_type_size(ins->src_types[1]);
assert(osz == 32 || osz == 16);
assert(isz == 32 || isz == 16);
ins->texture.out_full = (osz == 32);
ins->texture.in_reg_full = (isz == 32);
ctx->texture_op_count--;
if (mir_op_computes_derivatives(ctx->stage, ins->texture.op)) {