pvr: Add support for emitpix
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Acked-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21474>
This commit is contained in:

committed by
Marge Bot

parent
bdbd69edb8
commit
432fea181d
@@ -624,6 +624,10 @@ static void rogue_calc_backend_instrs_size(rogue_instr_group *group,
|
||||
}
|
||||
break;
|
||||
|
||||
case ROGUE_BACKEND_OP_EMITPIX:
|
||||
group->size.instrs[phase] = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
unreachable("Unsupported backend op.");
|
||||
}
|
||||
|
@@ -1339,6 +1339,8 @@ enum rogue_backend_op {
|
||||
ROGUE_BACKEND_OP_UVSW_EMITTHENENDTASK,
|
||||
ROGUE_BACKEND_OP_UVSW_WRITETHENEMITTHENENDTASK,
|
||||
|
||||
ROGUE_BACKEND_OP_EMITPIX,
|
||||
|
||||
ROGUE_BACKEND_OP_LD,
|
||||
|
||||
ROGUE_BACKEND_OP_FITR_PIXEL,
|
||||
@@ -1439,6 +1441,8 @@ enum rogue_backend_op_mod {
|
||||
|
||||
ROGUE_BACKEND_OP_MOD_SAT, /* Saturate output. */
|
||||
|
||||
ROGUE_BACKEND_OP_MOD_FREEP, /* Free partition. */
|
||||
|
||||
ROGUE_BACKEND_OP_MOD_COUNT,
|
||||
};
|
||||
|
||||
|
@@ -37,6 +37,10 @@
|
||||
#define ROGUE_BUILDER_DEFINE_BACKEND00(...)
|
||||
#endif /* ROGUE_BUILDER_DEFINE_BACKEND00 */
|
||||
|
||||
#ifndef ROGUE_BUILDER_DEFINE_BACKEND02
|
||||
#define ROGUE_BUILDER_DEFINE_BACKEND02(...)
|
||||
#endif /* ROGUE_BUILDER_DEFINE_BACKEND02 */
|
||||
|
||||
#ifndef ROGUE_BUILDER_DEFINE_BACKEND11
|
||||
#define ROGUE_BUILDER_DEFINE_BACKEND11(...)
|
||||
#endif /* ROGUE_BUILDER_DEFINE_BACKEND11 */
|
||||
@@ -57,6 +61,8 @@ ROGUE_BUILDER_DEFINE_BACKEND00(UVSW_EMIT)
|
||||
ROGUE_BUILDER_DEFINE_BACKEND00(UVSW_ENDTASK)
|
||||
ROGUE_BUILDER_DEFINE_BACKEND00(UVSW_EMITTHENENDTASK)
|
||||
|
||||
ROGUE_BUILDER_DEFINE_BACKEND02(EMITPIX)
|
||||
|
||||
ROGUE_BUILDER_DEFINE_BACKEND11(UVSW_WRITE)
|
||||
ROGUE_BUILDER_DEFINE_BACKEND11(UVSW_WRITETHENEMITTHENENDTASK)
|
||||
|
||||
@@ -73,4 +79,5 @@ ROGUE_BUILDER_DEFINE_BACKEND16(SMP3D)
|
||||
#undef ROGUE_BUILDER_DEFINE_BACKEND14
|
||||
#undef ROGUE_BUILDER_DEFINE_BACKEND13
|
||||
#undef ROGUE_BUILDER_DEFINE_BACKEND11
|
||||
#undef ROGUE_BUILDER_DEFINE_BACKEND02
|
||||
#undef ROGUE_BUILDER_DEFINE_BACKEND00
|
||||
|
@@ -239,6 +239,16 @@ rogue_build_backend00(rogue_builder *b, enum rogue_backend_op op)
|
||||
return rogue_build_backend(b, op, 0, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
static inline rogue_backend_instr *
|
||||
rogue_build_backend02(rogue_builder *b,
|
||||
enum rogue_backend_op op,
|
||||
rogue_ref src0,
|
||||
rogue_ref src1)
|
||||
{
|
||||
rogue_ref srcs[] = { src0, src1 };
|
||||
return rogue_build_backend(b, op, 0, NULL, 2, srcs);
|
||||
}
|
||||
|
||||
static inline rogue_backend_instr *
|
||||
rogue_build_backend11(rogue_builder *b,
|
||||
enum rogue_backend_op op,
|
||||
@@ -302,6 +312,17 @@ rogue_build_backend16(rogue_builder *b,
|
||||
return rogue_build_backend00(b, ROGUE_BACKEND_OP_##op); \
|
||||
}
|
||||
|
||||
#define ROGUE_BUILDER_DEFINE_BACKEND02(op) \
|
||||
PUBLIC \
|
||||
rogue_backend_instr *rogue_##op(rogue_builder *b, \
|
||||
rogue_ref src0, \
|
||||
rogue_ref src1) \
|
||||
{ \
|
||||
assert(rogue_backend_op_infos[ROGUE_BACKEND_OP_##op].num_dsts == 0); \
|
||||
assert(rogue_backend_op_infos[ROGUE_BACKEND_OP_##op].num_srcs == 2); \
|
||||
return rogue_build_backend02(b, ROGUE_BACKEND_OP_##op, src0, src1); \
|
||||
}
|
||||
|
||||
#define ROGUE_BUILDER_DEFINE_BACKEND11(op) \
|
||||
PUBLIC \
|
||||
rogue_backend_instr *rogue_##op(rogue_builder *b, \
|
||||
|
@@ -133,6 +133,11 @@ static inline rogue_block *rogue_push_block(rogue_builder *b)
|
||||
#define ROGUE_BUILDER_DEFINE_BACKEND00(op) \
|
||||
rogue_backend_instr *rogue_##op(rogue_builder *b);
|
||||
|
||||
#define ROGUE_BUILDER_DEFINE_BACKEND02(op) \
|
||||
rogue_backend_instr *rogue_##op(rogue_builder *b, \
|
||||
rogue_ref src0, \
|
||||
rogue_ref src1);
|
||||
|
||||
#define ROGUE_BUILDER_DEFINE_BACKEND11(op) \
|
||||
rogue_backend_instr *rogue_##op(rogue_builder *b, \
|
||||
rogue_ref dst0, \
|
||||
|
@@ -523,6 +523,12 @@ static void rogue_encode_backend_instr(const rogue_backend_instr *backend,
|
||||
|
||||
break;
|
||||
|
||||
case ROGUE_BACKEND_OP_EMITPIX:
|
||||
instr_encoding->backend.op = BACKENDOP_EMIT;
|
||||
instr_encoding->backend.emitpix.freep =
|
||||
rogue_backend_op_mod_is_set(backend, OM(FREEP));
|
||||
break;
|
||||
|
||||
default:
|
||||
unreachable("Unsupported backend op.");
|
||||
}
|
||||
|
@@ -257,6 +257,11 @@ const rogue_backend_op_info rogue_backend_op_infos[ROGUE_BACKEND_OP_COUNT] = {
|
||||
.supported_dst_types = { [0] = T(REG), },
|
||||
.supported_src_types = { [0] = T(REG), },
|
||||
},
|
||||
[ROGUE_BACKEND_OP_EMITPIX] = { .str = "emitpix", .num_srcs = 2,
|
||||
.phase_io = { .src[0] = IO(S0), .src[1] = IO(S2), },
|
||||
.supported_op_mods = OM(FREEP),
|
||||
.supported_src_types = { [0] = T(REG), [1] = T(REG), },
|
||||
},
|
||||
/* .src[1] and .src[2] can actually be S0-5. */
|
||||
[ROGUE_BACKEND_OP_LD] = { .str = "ld", .num_dsts = 1, .num_srcs = 3,
|
||||
.phase_io = { .dst[0] = IO(S3), .src[2] = IO(S0), },
|
||||
@@ -396,40 +401,32 @@ const rogue_backend_op_mod_info rogue_backend_op_mod_infos[ROGUE_BACKEND_OP_MOD_
|
||||
[ROGUE_BACKEND_OP_MOD_PROJ] = { .str = "proj", },
|
||||
[ROGUE_BACKEND_OP_MOD_FCNORM] = { .str = "fcnorm", },
|
||||
[ROGUE_BACKEND_OP_MOD_NNCOORDS] = { .str = "nncoords", },
|
||||
|
||||
[ROGUE_BACKEND_OP_MOD_BIAS] = { .str = "bias", .exclude = OM(REPLACE) | OM(GRADIENT) },
|
||||
[ROGUE_BACKEND_OP_MOD_REPLACE] = { .str = "replace", .exclude = OM(BIAS) | OM(GRADIENT) },
|
||||
[ROGUE_BACKEND_OP_MOD_GRADIENT] = { .str = "gradient", .exclude = OM(BIAS) | OM(REPLACE) },
|
||||
|
||||
[ROGUE_BACKEND_OP_MOD_PPLOD] = { .str = "pplod", .require = OM(BIAS) | OM(REPLACE) },
|
||||
[ROGUE_BACKEND_OP_MOD_TAO] = { .str = "tao", },
|
||||
[ROGUE_BACKEND_OP_MOD_SOO] = { .str = "soo", },
|
||||
[ROGUE_BACKEND_OP_MOD_SNO] = { .str = "sno", },
|
||||
[ROGUE_BACKEND_OP_MOD_WRT] = { .str = "wrt", },
|
||||
|
||||
[ROGUE_BACKEND_OP_MOD_DATA] = { .str = "data", .exclude = OM(INFO) | OM(BOTH) },
|
||||
[ROGUE_BACKEND_OP_MOD_INFO] = { .str = "info", .exclude = OM(DATA) | OM(BOTH) },
|
||||
[ROGUE_BACKEND_OP_MOD_BOTH] = { .str = "both", .exclude = OM(DATA) | OM(INFO) },
|
||||
|
||||
[ROGUE_BACKEND_OP_MOD_BYPASS] = { .str = "bypass", .exclude = OM(FORCELINEFILL) | OM(WRITETHROUGH) | OM(WRITEBACK) | OM(LAZYWRITEBACK) },
|
||||
[ROGUE_BACKEND_OP_MOD_FORCELINEFILL] = { .str = "forcelinefill", .exclude = OM(BYPASS) | OM(WRITETHROUGH) | OM(WRITEBACK) | OM(LAZYWRITEBACK) },
|
||||
|
||||
[ROGUE_BACKEND_OP_MOD_WRITETHROUGH] = { .str = "writethrough", .exclude = OM(BYPASS) | OM(FORCELINEFILL) | OM(WRITEBACK) | OM(LAZYWRITEBACK) },
|
||||
[ROGUE_BACKEND_OP_MOD_WRITEBACK] = { .str = "writeback", .exclude = OM(BYPASS) | OM(FORCELINEFILL) | OM(WRITETHROUGH) | OM(LAZYWRITEBACK) },
|
||||
[ROGUE_BACKEND_OP_MOD_LAZYWRITEBACK] = { .str = "lazywriteback", .exclude = OM(BYPASS) | OM(FORCELINEFILL) | OM(WRITETHROUGH) | OM(WRITEBACK) },
|
||||
|
||||
[ROGUE_BACKEND_OP_MOD_SLCBYPASS] = { .str = "slcbypass", .exclude = OM(SLCWRITEBACK) | OM(SLCWRITETHROUGH) | OM(SLCNOALLOC) },
|
||||
[ROGUE_BACKEND_OP_MOD_SLCWRITEBACK] = { .str = "slcwriteback", .exclude = OM(SLCBYPASS) | OM(SLCWRITETHROUGH) | OM(SLCNOALLOC) },
|
||||
[ROGUE_BACKEND_OP_MOD_SLCWRITETHROUGH] = { .str = "slcwritethrough", .exclude = OM(SLCBYPASS) | OM(SLCWRITEBACK) | OM(SLCNOALLOC) },
|
||||
[ROGUE_BACKEND_OP_MOD_SLCNOALLOC] = { .str = "slcnoalloc", .exclude = OM(SLCBYPASS) | OM(SLCWRITEBACK) | OM(SLCWRITETHROUGH) },
|
||||
|
||||
[ROGUE_BACKEND_OP_MOD_ARRAY] = { .str = "array", },
|
||||
[ROGUE_BACKEND_OP_MOD_INTEGER] = { .str = "integer", },
|
||||
[ROGUE_BACKEND_OP_MOD_SCHEDSWAP] = { .str = "schedswap", },
|
||||
|
||||
[ROGUE_BACKEND_OP_MOD_F16] = { .str = "f16", },
|
||||
|
||||
[ROGUE_BACKEND_OP_MOD_SAT] = { .str = "sat", },
|
||||
[ROGUE_BACKEND_OP_MOD_FREEP] = { .str = "freep", },
|
||||
};
|
||||
#undef OM
|
||||
|
||||
|
Reference in New Issue
Block a user