Mesa (master): nouveau: nv30: use a8r8g8b8 as depth texture format for z24s8
Patrice Mandin
pmandin at kemper.freedesktop.org
Thu Oct 22 20:02:08 UTC 2009
Module: Mesa
Branch: master
Commit: f9a69c0f040171cffa63c9c68264c1cf847aa1cd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f9a69c0f040171cffa63c9c68264c1cf847aa1cd
Author: Patrice Mandin <patmandin at gmail.com>
Date: Thu Oct 22 21:55:09 2009 +0200
nouveau: nv30: use a8r8g8b8 as depth texture format for z24s8
---
src/gallium/drivers/nv30/nv30_fragtex.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/nv30/nv30_fragtex.c b/src/gallium/drivers/nv30/nv30_fragtex.c
index a2ce947..f5f17d4 100644
--- a/src/gallium/drivers/nv30/nv30_fragtex.c
+++ b/src/gallium/drivers/nv30/nv30_fragtex.c
@@ -30,7 +30,7 @@ nv30_texture_formats[] = {
_(I8_UNORM , L8 , S1, S1, S1, S1, X, X, X, X),
_(A8L8_UNORM , A8L8 , S1, S1, S1, S1, X, X, X, Y),
// _(Z16_UNORM , Z16 , S1, S1, S1, ONE, X, X, X, X),
-// _(Z24S8_UNORM , Z24 , S1, S1, S1, ONE, X, X, X, X),
+ _(Z24S8_UNORM , A8R8G8B8, S1, S1, S1, ONE, X, X, X, X),
_(DXT1_RGB , DXT1 , S1, S1, S1, ONE, X, Y, Z, W),
_(DXT1_RGBA , DXT1 , S1, S1, S1, S1, X, Y, Z, W),
_(DXT3_RGBA , DXT3 , S1, S1, S1, S1, X, Y, Z, W),
@@ -73,9 +73,9 @@ nv30_fragtex_build(struct nv30_context *nv30, int unit)
txf = tf->format;
txf |= ((pt->last_level>0) ? NV34TCL_TX_FORMAT_MIPMAP : 0);
- txf |= log2i(pt->width[0]) << 20;
- txf |= log2i(pt->height[0]) << 24;
- txf |= log2i(pt->depth[0]) << 28;
+ txf |= log2i(pt->width[0]) << NV34TCL_TX_FORMAT_BASE_SIZE_U_SHIFT;
+ txf |= log2i(pt->height[0]) << NV34TCL_TX_FORMAT_BASE_SIZE_V_SHIFT;
+ txf |= log2i(pt->depth[0]) << NV34TCL_TX_FORMAT_BASE_SIZE_W_SHIFT;
txf |= NV34TCL_TX_FORMAT_NO_BORDER | 0x10000;
switch (pt->target) {
More information about the mesa-commit
mailing list