mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 06:30:11 +01:00
vc4: Add a QIR value for the QPU element register.
This will be used in the ddx/ddy support for "Am I the top half?" or "Am I the left half?" checks.
This commit is contained in:
parent
5b03975889
commit
31da39ddc9
4 changed files with 8 additions and 0 deletions
|
|
@ -292,6 +292,7 @@ qir_print_reg(struct vc4_compile *c, struct qreg reg, bool write)
|
|||
[QFILE_FRAG_X] = "frag_x",
|
||||
[QFILE_FRAG_Y] = "frag_y",
|
||||
[QFILE_FRAG_REV_FLAG] = "frag_rev_flag",
|
||||
[QFILE_QPU_ELEMENT] = "elem",
|
||||
};
|
||||
|
||||
switch (reg.file) {
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ enum qfile {
|
|||
QFILE_FRAG_X,
|
||||
QFILE_FRAG_Y,
|
||||
QFILE_FRAG_REV_FLAG,
|
||||
QFILE_QPU_ELEMENT,
|
||||
|
||||
/**
|
||||
* Stores an immediate value in the index field that will be used
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ void qir_validate(struct vc4_compile *c)
|
|||
case QFILE_FRAG_X:
|
||||
case QFILE_FRAG_Y:
|
||||
case QFILE_FRAG_REV_FLAG:
|
||||
case QFILE_QPU_ELEMENT:
|
||||
case QFILE_SMALL_IMM:
|
||||
case QFILE_LOAD_IMM:
|
||||
fail_instr(c, inst, "Bad dest file");
|
||||
|
|
@ -98,6 +99,7 @@ void qir_validate(struct vc4_compile *c)
|
|||
case QFILE_UNIF:
|
||||
case QFILE_VPM:
|
||||
case QFILE_LOAD_IMM:
|
||||
case QFILE_QPU_ELEMENT:
|
||||
break;
|
||||
|
||||
case QFILE_SMALL_IMM:
|
||||
|
|
|
|||
|
|
@ -339,6 +339,9 @@ vc4_generate_code_block(struct vc4_compile *c,
|
|||
case QFILE_FRAG_REV_FLAG:
|
||||
src[i] = qpu_rb(QPU_R_MS_REV_FLAGS);
|
||||
break;
|
||||
case QFILE_QPU_ELEMENT:
|
||||
src[i] = qpu_ra(QPU_R_ELEM_QPU);
|
||||
break;
|
||||
|
||||
case QFILE_TLB_COLOR_WRITE:
|
||||
case QFILE_TLB_COLOR_WRITE_MS:
|
||||
|
|
@ -383,6 +386,7 @@ vc4_generate_code_block(struct vc4_compile *c,
|
|||
case QFILE_FRAG_X:
|
||||
case QFILE_FRAG_Y:
|
||||
case QFILE_FRAG_REV_FLAG:
|
||||
case QFILE_QPU_ELEMENT:
|
||||
assert(!"not reached");
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue