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 <robdclark@gmail.com>
This commit is contained in:
Rob Clark 2019-02-21 15:44:35 -05:00
parent bdedb8277a
commit f90c3b4485
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;
}