diff options
author | Ilia Mirkin <[email protected]> | 2017-07-08 10:51:19 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2017-07-08 21:14:58 -0400 |
commit | 4ad40094739af2613d9dd6cefefe2dfe32af776c (patch) | |
tree | 3249c4143501097fbce3f4ef21b747a30fb0de58 /src/gallium/drivers/freedreno/a5xx | |
parent | cf173b5dcd0bf26a18965161ec6cbe1b562f87ac (diff) |
a5xx: fix border color for depth formats
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a5xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a5xx/fd5_emit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c index c138905cefb..8465389763c 100644 --- a/src/gallium/drivers/freedreno/a5xx/fd5_emit.c +++ b/src/gallium/drivers/freedreno/a5xx/fd5_emit.c @@ -173,7 +173,8 @@ struct PACKED bcolor_entry { uint8_t ui8[4]; int8_t si8[4]; uint32_t rgb10a2; - uint8_t __pad1[36]; + uint32_t z24; /* also s8? */ + uint8_t __pad1[32]; }; #define FD5_BORDER_COLOR_SIZE 0x60 @@ -213,6 +214,7 @@ setup_border_colors(struct fd_texture_stateobj *tex, struct bcolor_entry *entrie e->rgb5a1 = 0; e->rgba4 = 0; e->rgb10a2 = 0; + e->z24 = 0; for (j = 0; j < 4; j++) { int c = desc->swizzle[j]; @@ -275,6 +277,8 @@ setup_border_colors(struct fd_texture_stateobj *tex, struct bcolor_entry *entrie else e->rgb10a2 |= (int)(f_u * 0x3ff) << (c * 10); e->rgba4 |= (int)(f_u * 0xf) << (c * 4); + if (c == 0) + e->z24 = f_u * 0xffffff; } } |