summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-02-21 15:44:35 -0500
committerRob Clark <[email protected]>2019-02-22 14:05:32 -0500
commitf90c3b448508cbed26f697c9f36fd1ee6264a32b (patch)
tree998c10bf5b652ce8b1d8e4472d04c10a5914a5ea
parentbdedb8277a96341c8ccd268e75b4e877286fa8ab (diff)
freedreno/a6xx: fix border-color offset
Fixes nearly all of dEQP-GLES31.functional.texture.border_clamp.* when run after a test that binds textures used in vertex shader. Signed-off-by: Rob Clark <[email protected]>
-rw-r--r--src/freedreno/registers/a6xx.xml.h4
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_emit.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/freedreno/registers/a6xx.xml.h b/src/freedreno/registers/a6xx.xml.h
index 78869bf0469..227a04aafbe 100644
--- a/src/freedreno/registers/a6xx.xml.h
+++ b/src/freedreno/registers/a6xx.xml.h
@@ -5215,8 +5215,8 @@ static inline uint32_t A6XX_TEX_SAMP_1_MIN_LOD(float val)
}
#define REG_A6XX_TEX_SAMP_2 0x00000002
-#define A6XX_TEX_SAMP_2_BCOLOR_OFFSET__MASK 0xfffffff0
-#define A6XX_TEX_SAMP_2_BCOLOR_OFFSET__SHIFT 4
+#define A6XX_TEX_SAMP_2_BCOLOR_OFFSET__MASK 0xffffffff
+#define A6XX_TEX_SAMP_2_BCOLOR_OFFSET__SHIFT 0
static inline uint32_t A6XX_TEX_SAMP_2_BCOLOR_OFFSET(uint32_t val)
{
return ((val) << A6XX_TEX_SAMP_2_BCOLOR_OFFSET__SHIFT) & A6XX_TEX_SAMP_2_BCOLOR_OFFSET__MASK;
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
index daa06d22c82..243d44335ac 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.c
@@ -370,7 +370,7 @@ fd6_emit_textures(struct fd_pipe *pipe, struct fd_ringbuffer *ring,
OUT_RING(state, sampler->texsamp0);
OUT_RING(state, sampler->texsamp1);
OUT_RING(state, sampler->texsamp2 |
- A6XX_TEX_SAMP_2_BCOLOR_OFFSET(bcolor_offset));
+ A6XX_TEX_SAMP_2_BCOLOR_OFFSET((i + bcolor_offset) * sizeof(struct bcolor_entry)));
OUT_RING(state, sampler->texsamp3);
needs_border |= sampler->needs_border;
}