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:
Eric Anholt 2014-12-15 10:45:58 -08:00
parent ade7704685
commit 8e678de761
5 changed files with 20 additions and 20 deletions

View File

@ -1024,7 +1024,7 @@ emit_vertex_input(struct vc4_compile *c, int attr)
struct qreg vpm = vpm_reads[0];
if (desc->channel[swiz].type == UTIL_FORMAT_TYPE_SIGNED)
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 {
if (!format_warned) {
fprintf(stderr,

View File

@ -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_C] = { "r4_unpack_c", 1, 1 },
[QOP_R4_UNPACK_D] = { "r4_unpack_d", 1, 1 },
[QOP_UNPACK_8A] = { "unpack_8a", 1, 1 },
[QOP_UNPACK_8B] = { "unpack_8b", 1, 1 },
[QOP_UNPACK_8C] = { "unpack_8c", 1, 1 },
[QOP_UNPACK_8D] = { "unpack_8d", 1, 1 },
[QOP_UNPACK_8A_F] = { "unpack_8a_f", 1, 1 },
[QOP_UNPACK_8B_F] = { "unpack_8b_f", 1, 1 },
[QOP_UNPACK_8C_F] = { "unpack_8c_f", 1, 1 },
[QOP_UNPACK_8D_F] = { "unpack_8d_f", 1, 1 },
};
static const char *

View File

@ -109,10 +109,10 @@ enum qop {
QOP_FRAG_W,
QOP_FRAG_REV_FLAG,
QOP_UNPACK_8A,
QOP_UNPACK_8B,
QOP_UNPACK_8C,
QOP_UNPACK_8D,
QOP_UNPACK_8A_F,
QOP_UNPACK_8B_F,
QOP_UNPACK_8C_F,
QOP_UNPACK_8D_F,
/** Texture x coordinate parameter write */
QOP_TEX_S,
@ -489,10 +489,10 @@ qir_SEL_X_0_COND(struct vc4_compile *c, int i)
}
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);
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;
}

View File

@ -468,10 +468,10 @@ vc4_generate_code(struct vc4_context *vc4, struct vc4_compile *c)
break;
case QOP_UNPACK_8A:
case QOP_UNPACK_8B:
case QOP_UNPACK_8C:
case QOP_UNPACK_8D: {
case QOP_UNPACK_8A_F:
case QOP_UNPACK_8B_F:
case QOP_UNPACK_8C_F:
case QOP_UNPACK_8D_F: {
assert(src[0].mux == QPU_MUX_A);
/* 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]));
*last_inst(c) |= QPU_SET_FIELD(QPU_UNPACK_8A +
(qinst->op -
QOP_UNPACK_8A),
QOP_UNPACK_8A_F),
QPU_UNPACK);
if (orig_dst.mux == QPU_MUX_A) {

View File

@ -254,10 +254,10 @@ vc4_register_allocate(struct vc4_context *vc4, struct vc4_compile *c)
vc4->reg_class_a);
break;
case QOP_UNPACK_8A:
case QOP_UNPACK_8B:
case QOP_UNPACK_8C:
case QOP_UNPACK_8D:
case QOP_UNPACK_8A_F:
case QOP_UNPACK_8B_F:
case QOP_UNPACK_8C_F:
case QOP_UNPACK_8D_F:
/* The unpack flags require an A-file src register. */
ra_set_node_class(g, temp_to_node[inst->src[0].index],
vc4->reg_class_a);