Mesa (master): nv50: fix tile flags for scanout tex usage

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Sat Jan 16 09:08:53 PST 2010


Module: Mesa
Branch: master
Commit: 83387cb6c42e283440e0d1e592fbe3c93a6622c7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=83387cb6c42e283440e0d1e592fbe3c93a6622c7

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Sat Jan 16 17:58:35 2010 +0100

nv50: fix tile flags for scanout tex usage

---

 src/gallium/drivers/nv50/nv50_miptree.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/nv50/nv50_miptree.c b/src/gallium/drivers/nv50/nv50_miptree.c
index cecb1ef..dc8364c 100644
--- a/src/gallium/drivers/nv50/nv50_miptree.c
+++ b/src/gallium/drivers/nv50/nv50_miptree.c
@@ -92,12 +92,23 @@ nv50_miptree_create(struct pipe_screen *pscreen, const struct pipe_texture *tmp)
 	case PIPE_FORMAT_Z24S8_UNORM:
 		tile_flags = 0x1800;
 		break;
+	case PIPE_FORMAT_Z16_UNORM:
+		tile_flags = 0x6c00;
+		break;
 	case PIPE_FORMAT_X8Z24_UNORM:
 	case PIPE_FORMAT_S8Z24_UNORM:
 		tile_flags = 0x2800;
 		break;
+	case PIPE_FORMAT_R32G32B32A32_FLOAT:
+	case PIPE_FORMAT_R32G32B32_FLOAT:
+		tile_flags = 0x7400;
+		break;
 	default:
-		tile_flags = 0x7000;
+		if ((pt->tex_usage & PIPE_TEXTURE_USAGE_PRIMARY) &&
+		    util_format_get_blocksizebits(pt->format) == 32)
+			tile_flags = 0x7a00;
+		else
+			tile_flags = 0x7000;
 		break;
 	}
 



More information about the mesa-commit mailing list