Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
/* 4-bit type tags */
+#define TAG_TEXTURE_4_VTX 0x2
#define TAG_TEXTURE_4 0x3
#define TAG_LOAD_STORE_4 0x5
#define TAG_ALU_4 0x8
case TAG_ALU_4:
case TAG_LOAD_STORE_4:
case TAG_TEXTURE_4:
+ case TAG_TEXTURE_4_VTX:
return 1;
case TAG_ALU_8:
return 2;
break;
}
- case TAG_TEXTURE_4: {
+ case TAG_TEXTURE_4:
+ case TAG_TEXTURE_4_VTX: {
/* Texture instructions are easy, since there is no pipelining
- * nor VLIW to worry about. We may need to set .last flag */
+ * nor VLIW to worry about. We may need to set .cont/.last
+ * flags. */
midgard_instruction *ins = bundle->instructions[0];
- ins->texture.type = TAG_TEXTURE_4;
+ ins->texture.type = bundle->tag;
ins->texture.next_type = next_tag;
ctx->texture_op_count--;
break;
}
+ case TAG_TEXTURE_4: {
+ /* Which tag we use depends on the shader stage */
+ bool in_frag = ctx->stage == MESA_SHADER_FRAGMENT;
+ bundle.tag = in_frag ? TAG_TEXTURE_4 : TAG_TEXTURE_4_VTX;
+ break;
+ }
+
default:
- /* Texture ops default to single-op-per-bundle scheduling */
+ unreachable("Unknown tag");
break;
}