v3d: Switch implicit uniforms over to being any qinst->uniform != ~0.
I'm not sure why I didn't do this before -- it's clearly much simpler to add dumping of the extra thing than to have it as another implicit source.
This commit is contained in:
@@ -134,11 +134,11 @@ struct qinst {
|
||||
/* Pre-register-allocation references to src/dst registers */
|
||||
struct qreg dst;
|
||||
struct qreg src[3];
|
||||
bool has_implicit_uniform;
|
||||
bool is_last_thrsw;
|
||||
|
||||
/* After vir_to_qpu.c: If instr reads a uniform, which uniform from
|
||||
* the uncompiled stream it is.
|
||||
/* If the instruction reads a uniform (other than through src[i].file
|
||||
* == QFILE_UNIF), that uniform's index in c->uniform_contents. ~0
|
||||
* otherwise.
|
||||
*/
|
||||
int uniform;
|
||||
};
|
||||
@@ -727,6 +727,12 @@ struct v3d_fs_prog_data {
|
||||
bool uses_center_w;
|
||||
};
|
||||
|
||||
static inline bool
|
||||
vir_has_uniform(struct qinst *inst)
|
||||
{
|
||||
return inst->uniform != ~0;
|
||||
}
|
||||
|
||||
/* Special nir_load_input intrinsic index for loading the current TLB
|
||||
* destination color.
|
||||
*/
|
||||
@@ -763,8 +769,12 @@ struct qinst *vir_add_inst(enum v3d_qpu_add_op op, struct qreg dst,
|
||||
struct qreg src0, struct qreg src1);
|
||||
struct qinst *vir_mul_inst(enum v3d_qpu_mul_op op, struct qreg dst,
|
||||
struct qreg src0, struct qreg src1);
|
||||
struct qinst *vir_branch_inst(enum v3d_qpu_branch_cond cond, struct qreg src0);
|
||||
struct qinst *vir_branch_inst(struct v3d_compile *c,
|
||||
enum v3d_qpu_branch_cond cond);
|
||||
void vir_remove_instruction(struct v3d_compile *c, struct qinst *qinst);
|
||||
uint32_t vir_get_uniform_index(struct v3d_compile *c,
|
||||
enum quniform_contents contents,
|
||||
uint32_t data);
|
||||
struct qreg vir_uniform(struct v3d_compile *c,
|
||||
enum quniform_contents contents,
|
||||
uint32_t data);
|
||||
@@ -782,9 +792,6 @@ void vir_set_unpack(struct qinst *inst, int src,
|
||||
struct qreg vir_get_temp(struct v3d_compile *c);
|
||||
void vir_emit_last_thrsw(struct v3d_compile *c);
|
||||
void vir_calculate_live_intervals(struct v3d_compile *c);
|
||||
bool vir_has_implicit_uniform(struct qinst *inst);
|
||||
int vir_get_implicit_uniform_src(struct qinst *inst);
|
||||
int vir_get_non_sideband_nsrc(struct qinst *inst);
|
||||
int vir_get_nsrc(struct qinst *inst);
|
||||
bool vir_has_side_effects(struct v3d_compile *c, struct qinst *inst);
|
||||
bool vir_get_add_op(struct qinst *inst, enum v3d_qpu_add_op *op);
|
||||
@@ -1122,7 +1129,7 @@ static inline struct qinst *
|
||||
vir_BRANCH(struct v3d_compile *c, enum v3d_qpu_branch_cond cond)
|
||||
{
|
||||
/* The actual uniform_data value will be set at scheduling time */
|
||||
return vir_emit_nondef(c, vir_branch_inst(cond, vir_uniform_ui(c, 0)));
|
||||
return vir_emit_nondef(c, vir_branch_inst(c, cond));
|
||||
}
|
||||
|
||||
#define vir_for_each_block(block, c) \
|
||||
|
Reference in New Issue
Block a user