summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-05-02 23:46:28 -0400
committerIlia Mirkin <imirkin@alum.mit.edu>2014-05-04 20:05:44 -0400
commitcee22a0b48a3d52996d8a660ad1918b325f4a24e (patch)
tree4b02f78bf32c4696db52d4d807d818bffb9e8b41
parentb7e7ae9f605283076dba6d9e826fbbd1f1db1c4b (diff)
nv50,nvc0: add X8Z24_UNORM, fix stencil-only formats
S8_UINT will become useful when ARB_texture_stencil8 becomes supported by mesa. The other stencil formats are needed for ARB_stencil_texturing. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_formats.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_formats.c b/src/gallium/drivers/nouveau/nv50/nv50_formats.c
index fa93ce871b6..3af34c17fdb 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_formats.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_formats.c
@@ -131,6 +131,9 @@
#define SZB(p, n, r, g, b, a, t, s, u) \
TBLENT_B_(p, NV50_ZETA_FORMAT_##n, \
r, g, b, ONE_FLOAT, UINT, t, UINT, UINT, s, u)
+#define SXB(p, r, s, u) \
+ TBLENT_B_(p, NV50_ZETA_FORMAT_NONE, \
+ r, r, r, r, UINT, UINT, UINT, UINT, s, u)
#define F3A(p, n, r, g, b, a, t, s, u) \
C4A(p, n, r, g, b, ONE_FLOAT, t, s, u, 0)
@@ -180,13 +183,16 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
ZXB(Z16_UNORM, Z16_UNORM, C0, C0, C0, xx, UNORM, Z16, TZ),
ZXB(Z32_FLOAT, Z32_FLOAT, C0, C0, C0, xx, FLOAT, Z32, TZ),
ZXB(Z24X8_UNORM, Z24_X8_UNORM, C0, C0, C0, xx, UNORM, Z24_X8, TZ),
+ SZB(X8Z24_UNORM, S8_Z24_UNORM, C1, C1, C1, xx, UNORM, S8_Z24, TZ),
ZSB(Z24_UNORM_S8_UINT, Z24_S8_UNORM, C0, C0, C0, xx, UNORM, Z24_S8, TZ),
- ZSB(X24S8_UINT, NONE, C1, C1, C1, xx, UNORM, Z24_S8, T),
SZB(S8_UINT_Z24_UNORM, S8_Z24_UNORM, C1, C1, C1, xx, UNORM, S8_Z24, TZ),
- SZB(S8X24_UINT, NONE, C0, C0, C0, xx, UNORM, S8_Z24, T),
ZSB(Z32_FLOAT_S8X24_UINT, Z32_S8_X24_FLOAT, C0, C0, C0, xx, FLOAT,
Z32_S8_X24, TZ),
- ZSB(X32_S8X24_UINT, NONE, C1, C1, C1, xx, FLOAT, Z32_S8_X24, T),
+
+ SXB(S8_UINT, C0, 8, T),
+ SXB(X24S8_UINT, C1, Z24_S8, T),
+ SXB(S8X24_UINT, C0, S8_Z24, T),
+ SXB(X32_S8X24_UINT, C1, Z32_S8_X24, T),
F3B(B5G6R5_UNORM, B5G6R5_UNORM, C2, C1, C0, xx, UNORM, 5_6_5, T),
C4B(B5G5R5A1_UNORM, BGR5_A1_UNORM, C2, C1, C0, C3, UNORM, 5_5_5_1, TB),