summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_resource.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_resource.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c
index fb46be3916b..3048b23eec3 100644
--- a/src/gallium/drivers/vc4/vc4_resource.c
+++ b/src/gallium/drivers/vc4/vc4_resource.c
@@ -267,11 +267,14 @@ static enum vc4_texture_data_type
get_resource_texture_format(struct pipe_resource *prsc)
{
struct vc4_resource *rsc = vc4_resource(prsc);
+ uint8_t format = vc4_get_tex_format(prsc->format);
- if (rsc->tiled)
- return VC4_TEXTURE_TYPE_RGBA8888;
- else
+ if (!rsc->tiled) {
+ assert(format == VC4_TEXTURE_TYPE_RGBA8888);
return VC4_TEXTURE_TYPE_RGBA32R;
+ }
+
+ return format;
}
static struct pipe_resource *