From 059da344ec17853bb503a7e4afa229c2e2a98c83 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sat, 7 Nov 2015 22:13:16 -0500 Subject: freedreno/a3xx: add fake RGTC support (required for GL3) Also throw in LATC while we're at it (same exact format). This could be made more efficient by keeping a shadow compressed texture to use for returning at map time. However... it's not worth it for now... presumably compressed textures are not updated often. Lastly fix up Z32S8 transfers to non-0 layers. Signed-off-by: Ilia Mirkin Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_texture.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/drivers/freedreno/freedreno_texture.c') diff --git a/src/gallium/drivers/freedreno/freedreno_texture.c b/src/gallium/drivers/freedreno/freedreno_texture.c index 04e4643b4c9..f03b65b0ae5 100644 --- a/src/gallium/drivers/freedreno/freedreno_texture.c +++ b/src/gallium/drivers/freedreno/freedreno_texture.c @@ -212,6 +212,10 @@ fd_setup_border_colors(struct fd_texture_stateobj *tex, void *ptr, if (desc->layout == UTIL_FORMAT_LAYOUT_OTHER) size = 16; + /* We fake RGTC as if it were RGBA8 */ + if (desc->layout == UTIL_FORMAT_LAYOUT_RGTC) + size = 8; + if (chan->pure_integer && size > 16) bcolor32[desc->swizzle[j] + 4] = sampler->border_color.i[j]; -- cgit v1.2.3