diff options
author | Eric Anholt <eric@anholt.net> | 2016-11-15 12:54:26 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2016-11-29 08:38:59 -0800 |
commit | d4c20e82ae34b105fb2d06c8c412656aba2ca1b9 (patch) | |
tree | 353ef165ca46bb0ec7dbe3a500926c50350b6309 /src/gallium/drivers/vc4/vc4_qir_validate.c | |
parent | 314f0c57e4c00b0a5cb544fa43e356c1069acd8f (diff) |
vc4: Restructure texture insts as ALU ops with tex_[strb] as the dst.
For now we're still just generating MOVs, but this will let us fold into
other ops in the future. No difference on shader-db.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir_validate.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qir_validate.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir_validate.c b/src/gallium/drivers/vc4/vc4_qir_validate.c index 9579f7a15cb..302eb48265c 100644 --- a/src/gallium/drivers/vc4/vc4_qir_validate.c +++ b/src/gallium/drivers/vc4/vc4_qir_validate.c @@ -84,6 +84,25 @@ void qir_validate(struct vc4_compile *c) case QFILE_LOAD_IMM: fail_instr(c, inst, "Bad dest file"); break; + + case QFILE_TEX_S: + case QFILE_TEX_T: + case QFILE_TEX_R: + case QFILE_TEX_B: + if (inst->src[qir_get_tex_uniform_src(inst)].file != + QFILE_UNIF) { + fail_instr(c, inst, + "tex op missing implicit uniform"); + } + break; + + case QFILE_TEX_S_DIRECT: + if (inst->op != QOP_ADD) { + fail_instr(c, inst, + "kernel validation requires that " + "direct texture lookups use an ADD"); + } + break; } for (int i = 0; i < qir_get_nsrc(inst); i++) { @@ -119,6 +138,11 @@ void qir_validate(struct vc4_compile *c) case QFILE_TLB_COLOR_WRITE_MS: case QFILE_TLB_Z_WRITE: case QFILE_TLB_STENCIL_SETUP: + case QFILE_TEX_S_DIRECT: + case QFILE_TEX_S: + case QFILE_TEX_T: + case QFILE_TEX_R: + case QFILE_TEX_B: fail_instr(c, inst, "Bad src file"); break; } |