}
}
+static const char *
+partial_exection_mode(enum midgard_partial_execution mode)
+{
+ switch (mode) {
+ case MIDGARD_PARTIAL_EXECUTION_NONE: return "";
+ case MIDGARD_PARTIAL_EXECUTION_SKIP: return ".skip";
+ case MIDGARD_PARTIAL_EXECUTION_KILL: return ".kill";
+ default: return ".reserved";
+ }
+}
+
static void
print_texture_word(disassemble_context *ctx, FILE *fp, uint32_t *word,
unsigned tabs, unsigned in_reg_base, unsigned out_reg_base)
print_texture_format(fp, texture->format);
/* Instruction "modifiers" parallel the ALU instructions. */
-
- if (texture->cont)
- fprintf(fp, ".cont");
-
- if (texture->last)
- fprintf(fp, ".last");
+ fputs(partial_exection_mode(texture->exec), fp);
if (texture->out_of_order)
fprintf(fp, ".ooo%u", texture->out_of_order);
TEXTURE_DFDY = 1,
};
+enum midgard_partial_execution {
+ MIDGARD_PARTIAL_EXECUTION_SKIP = 1,
+ MIDGARD_PARTIAL_EXECUTION_KILL = 2,
+ MIDGARD_PARTIAL_EXECUTION_NONE = 3
+};
+
typedef struct
__attribute__((__packed__))
{
enum mali_texture_op op : 4;
unsigned mode : 4;
-
- /* A little obscure, but last is set for the last texture operation in
- * a shader. cont appears to just be last's opposite (?). Yeah, I know,
- * kind of funky.. BiOpen thinks it could do with memory hinting, or
- * tile locking? */
-
- unsigned cont : 1;
- unsigned last : 1;
+ enum midgard_partial_execution exec : 2;
unsigned format : 2;
ins->texture.type = bundle->tag;
ins->texture.next_type = next_tag;
+ ins->texture.exec = MIDGARD_PARTIAL_EXECUTION_NONE; /* default */
/* Nothing else to pack for barriers */
if (ins->op == midgard_tex_op_barrier) {
- ins->texture.cont = ins->texture.last = 1;
ins->texture.op = ins->op;
util_dynarray_append(emission, midgard_texture_word, ins->texture);
return;
ins->texture.outmod = ins->outmod;
if (mir_op_computes_derivatives(ctx->stage, ins->op)) {
- ins->texture.cont = !ins->helper_terminate;
- ins->texture.last = ins->helper_terminate || ins->helper_execute;
- } else {
- ins->texture.cont = ins->texture.last = 1;
+ if (ins->helper_terminate)
+ ins->texture.exec = MIDGARD_PARTIAL_EXECUTION_KILL;
+ else if (!ins->helper_execute)
+ ins->texture.exec = MIDGARD_PARTIAL_EXECUTION_SKIP;
}
midgard_texture_word texture = texture_word_from_instr(ins);