diff options
author | Kristian H. Kristensen <[email protected]> | 2019-02-12 10:17:55 -0800 |
---|---|---|
committer | Kristian H. Kristensen <[email protected]> | 2019-02-13 11:14:06 -0800 |
commit | 0a41ddbd4ecc5b0e01da523e2fe68255e277834d (patch) | |
tree | 3da112eeafae93ca9b49bd414106b2939a02eabc /src | |
parent | 2fbd2d5f58265bf83c0ddb123fe31463b546a4f6 (diff) |
freedreno/a6xx: Fix point coord
Use ir3_next_varying() for iterating through varyings and unset the
global point coord invert bit.
Fixes:
dEQP-GLES3.functional.shaders.builtin_variable.pointcoord
Signed-off-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_emit.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_program.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_program.h | 4 |
3 files changed, 4 insertions, 8 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c index fad3c09a733..2956f4cde6e 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c @@ -1070,7 +1070,8 @@ t7 opcode: CP_WAIT_FOR_IDLE (26) (1 dwords) WRITE(REG_A6XX_VPC_UNKNOWN_9101, 0xffff00); WRITE(REG_A6XX_VPC_UNKNOWN_9107, 0); - WRITE(REG_A6XX_VPC_UNKNOWN_9236, 1); + WRITE(REG_A6XX_VPC_UNKNOWN_9236, + A6XX_VPC_UNKNOWN_9236_POINT_COORD_INVERT(0)); WRITE(REG_A6XX_VPC_UNKNOWN_9300, 0); WRITE(REG_A6XX_VPC_SO_OVERRIDE, A6XX_VPC_SO_OVERRIDE_SO_DISABLE); diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c index 470bacfd5fe..634e521c59a 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c @@ -651,8 +651,7 @@ fd6_program_emit(struct fd_ringbuffer *ring, struct fd6_emit *emit) memset(vinterp, 0, sizeof(vinterp)); memset(vpsrepl, 0, sizeof(vpsrepl)); - for (int i = 0; i < state->fs_inputs_count; i++) { - int j = state->fs_inputs[i]; + for (int j = -1; (j = ir3_next_varying(fs, j)) < (int)fs->inputs_count; ) { /* NOTE: varyings are packed, so if compmask is 0xb * then first, third, and fourth component occupy @@ -666,7 +665,7 @@ fd6_program_emit(struct fd_ringbuffer *ring, struct fd6_emit *emit) (fs->inputs[j].rasterflat && emit->rasterflat)) { uint32_t loc = inloc; - for (i = 0; i < 4; i++) { + for (int i = 0; i < 4; i++) { if (compmask & (1 << i)) { vinterp[loc / 16] |= 1 << ((loc % 16) * 2); loc++; diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.h b/src/gallium/drivers/freedreno/a6xx/fd6_program.h index 3ed5426b50e..8bc95f5e940 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_program.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.h @@ -54,10 +54,6 @@ struct fd6_program_state { /* cached state about current emitted shader program (3d): */ struct fd6_streamout_state tf; - /* index and # of varyings: */ - uint8_t fs_inputs[16]; - uint8_t fs_inputs_count; - uint32_t vinterp[8]; }; |