summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKhaled Emara <[email protected]>2019-08-04 17:51:24 +0200
committerRob Clark <[email protected]>2019-08-12 22:30:54 +0000
commit2720ad5fd9d858f5bb72046017ba55f63345268b (patch)
tree7ef6929f59b9d00cbdb2dbd1d6dbe5c31ddea3e9 /src
parent0ae16fb565f5334c5d35a90836c675a32de2bf28 (diff)
freedreno: disable tiling for cubemaps
Tiling doesn't work quite well with cubemaps. Revert to linear textures, until it's fixed.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_resource.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_resource.c b/src/gallium/drivers/freedreno/a3xx/fd3_resource.c
index f6b52bd30a1..5bde52c62be 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_resource.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_resource.c
@@ -96,13 +96,16 @@ fd3_setup_slices(struct fd_resource *rsc)
}
static bool
-ok_format(enum pipe_format pfmt)
+ok_format(enum pipe_format pfmt, const struct pipe_resource * tmpl)
{
enum a3xx_color_fmt fmt = fd3_pipe2color(pfmt);
if (fmt == ~0)
return false;
+ if (tmpl->target == PIPE_TEXTURE_CUBE)
+ return false;
+
switch (pfmt) {
case PIPE_FORMAT_R8_UINT:
case PIPE_FORMAT_R8_SINT:
@@ -118,7 +121,7 @@ ok_format(enum pipe_format pfmt)
unsigned
fd3_tile_mode(const struct pipe_resource *tmpl)
{
- if (ok_format(tmpl->format))
+ if (ok_format(tmpl->format, tmpl))
return TILE_4X4;
return LINEAR;
}