summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_resource.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-03-23 16:21:25 -0700
committerEric Anholt <eric@anholt.net>2015-03-24 10:39:12 -0700
commit04605c21f65bfbc78018c5bafa8cbf49e96a33b5 (patch)
treef2eb2bfabf6ff6c309a8cb13278e891d0cab16ef /src/gallium/drivers/vc4/vc4_resource.c
parent25d60763d9c2767c279f28ac2a7eddcd245f4259 (diff)
downloadexternal_mesa3d-04605c21f65bfbc78018c5bafa8cbf49e96a33b5.zip
external_mesa3d-04605c21f65bfbc78018c5bafa8cbf49e96a33b5.tar.gz
external_mesa3d-04605c21f65bfbc78018c5bafa8cbf49e96a33b5.tar.bz2
vc4: Decide the HW's format before laying out the miptree.
I'm experimenting with a workaround for raster texture misrendering on hardware, and this lets me look at the format chosen when computing strides.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_resource.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_resource.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c
index 0dda0d8..c640cf6 100644
--- a/src/gallium/drivers/vc4/vc4_resource.c
+++ b/src/gallium/drivers/vc4/vc4_resource.c
@@ -373,14 +373,14 @@ vc4_resource_create(struct pipe_screen *pscreen,
rsc->tiled = true;
}
+ if (tmpl->target != PIPE_BUFFER)
+ rsc->vc4_format = get_resource_texture_format(prsc);
+
vc4_setup_slices(rsc);
vc4_resource_bo_alloc(rsc);
if (!rsc->bo)
goto fail;
- if (tmpl->target != PIPE_BUFFER)
- rsc->vc4_format = get_resource_texture_format(prsc);
-
return prsc;
fail:
vc4_resource_destroy(pscreen, prsc);