vc4: Rename UNPACK_8* to UNPACK_8*_F.
There is an equivalent unpack function without conversion to float if you use an integer operation instead.
This commit is contained in:
parent
ade7704685
commit
8e678de761
|
@ -1024,7 +1024,7 @@ emit_vertex_input(struct vc4_compile *c, int attr)
|
||||||
struct qreg vpm = vpm_reads[0];
|
struct qreg vpm = vpm_reads[0];
|
||||||
if (desc->channel[swiz].type == UTIL_FORMAT_TYPE_SIGNED)
|
if (desc->channel[swiz].type == UTIL_FORMAT_TYPE_SIGNED)
|
||||||
vpm = qir_XOR(c, vpm, qir_uniform_ui(c, 0x80808080));
|
vpm = qir_XOR(c, vpm, qir_uniform_ui(c, 0x80808080));
|
||||||
result = qir_UNPACK_8(c, vpm, swiz);
|
result = qir_UNPACK_8_F(c, vpm, swiz);
|
||||||
} else {
|
} else {
|
||||||
if (!format_warned) {
|
if (!format_warned) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
|
|
|
@ -99,10 +99,10 @@ static const struct qir_op_info qir_op_info[] = {
|
||||||
[QOP_R4_UNPACK_B] = { "r4_unpack_b", 1, 1 },
|
[QOP_R4_UNPACK_B] = { "r4_unpack_b", 1, 1 },
|
||||||
[QOP_R4_UNPACK_C] = { "r4_unpack_c", 1, 1 },
|
[QOP_R4_UNPACK_C] = { "r4_unpack_c", 1, 1 },
|
||||||
[QOP_R4_UNPACK_D] = { "r4_unpack_d", 1, 1 },
|
[QOP_R4_UNPACK_D] = { "r4_unpack_d", 1, 1 },
|
||||||
[QOP_UNPACK_8A] = { "unpack_8a", 1, 1 },
|
[QOP_UNPACK_8A_F] = { "unpack_8a_f", 1, 1 },
|
||||||
[QOP_UNPACK_8B] = { "unpack_8b", 1, 1 },
|
[QOP_UNPACK_8B_F] = { "unpack_8b_f", 1, 1 },
|
||||||
[QOP_UNPACK_8C] = { "unpack_8c", 1, 1 },
|
[QOP_UNPACK_8C_F] = { "unpack_8c_f", 1, 1 },
|
||||||
[QOP_UNPACK_8D] = { "unpack_8d", 1, 1 },
|
[QOP_UNPACK_8D_F] = { "unpack_8d_f", 1, 1 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
|
|
|
@ -109,10 +109,10 @@ enum qop {
|
||||||
QOP_FRAG_W,
|
QOP_FRAG_W,
|
||||||
QOP_FRAG_REV_FLAG,
|
QOP_FRAG_REV_FLAG,
|
||||||
|
|
||||||
QOP_UNPACK_8A,
|
QOP_UNPACK_8A_F,
|
||||||
QOP_UNPACK_8B,
|
QOP_UNPACK_8B_F,
|
||||||
QOP_UNPACK_8C,
|
QOP_UNPACK_8C_F,
|
||||||
QOP_UNPACK_8D,
|
QOP_UNPACK_8D_F,
|
||||||
|
|
||||||
/** Texture x coordinate parameter write */
|
/** Texture x coordinate parameter write */
|
||||||
QOP_TEX_S,
|
QOP_TEX_S,
|
||||||
|
@ -489,10 +489,10 @@ qir_SEL_X_0_COND(struct vc4_compile *c, int i)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct qreg
|
static inline struct qreg
|
||||||
qir_UNPACK_8(struct vc4_compile *c, struct qreg src, int i)
|
qir_UNPACK_8_F(struct vc4_compile *c, struct qreg src, int i)
|
||||||
{
|
{
|
||||||
struct qreg t = qir_get_temp(c);
|
struct qreg t = qir_get_temp(c);
|
||||||
qir_emit(c, qir_inst(QOP_UNPACK_8A + i, t, src, c->undef));
|
qir_emit(c, qir_inst(QOP_UNPACK_8A_F + i, t, src, c->undef));
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -468,10 +468,10 @@ vc4_generate_code(struct vc4_context *vc4, struct vc4_compile *c)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case QOP_UNPACK_8A:
|
case QOP_UNPACK_8A_F:
|
||||||
case QOP_UNPACK_8B:
|
case QOP_UNPACK_8B_F:
|
||||||
case QOP_UNPACK_8C:
|
case QOP_UNPACK_8C_F:
|
||||||
case QOP_UNPACK_8D: {
|
case QOP_UNPACK_8D_F: {
|
||||||
assert(src[0].mux == QPU_MUX_A);
|
assert(src[0].mux == QPU_MUX_A);
|
||||||
|
|
||||||
/* And, since we're setting the pack bits, if the
|
/* And, since we're setting the pack bits, if the
|
||||||
|
@ -484,7 +484,7 @@ vc4_generate_code(struct vc4_context *vc4, struct vc4_compile *c)
|
||||||
queue(c, qpu_a_FMAX(dst, src[0], src[0]));
|
queue(c, qpu_a_FMAX(dst, src[0], src[0]));
|
||||||
*last_inst(c) |= QPU_SET_FIELD(QPU_UNPACK_8A +
|
*last_inst(c) |= QPU_SET_FIELD(QPU_UNPACK_8A +
|
||||||
(qinst->op -
|
(qinst->op -
|
||||||
QOP_UNPACK_8A),
|
QOP_UNPACK_8A_F),
|
||||||
QPU_UNPACK);
|
QPU_UNPACK);
|
||||||
|
|
||||||
if (orig_dst.mux == QPU_MUX_A) {
|
if (orig_dst.mux == QPU_MUX_A) {
|
||||||
|
|
|
@ -254,10 +254,10 @@ vc4_register_allocate(struct vc4_context *vc4, struct vc4_compile *c)
|
||||||
vc4->reg_class_a);
|
vc4->reg_class_a);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case QOP_UNPACK_8A:
|
case QOP_UNPACK_8A_F:
|
||||||
case QOP_UNPACK_8B:
|
case QOP_UNPACK_8B_F:
|
||||||
case QOP_UNPACK_8C:
|
case QOP_UNPACK_8C_F:
|
||||||
case QOP_UNPACK_8D:
|
case QOP_UNPACK_8D_F:
|
||||||
/* The unpack flags require an A-file src register. */
|
/* The unpack flags require an A-file src register. */
|
||||||
ra_set_node_class(g, temp_to_node[inst->src[0].index],
|
ra_set_node_class(g, temp_to_node[inst->src[0].index],
|
||||||
vc4->reg_class_a);
|
vc4->reg_class_a);
|
||||||
|
|
Loading…
Reference in New Issue