summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-04-16 13:24:44 +0200
committerChristoph Bumiller <[email protected]>2011-04-17 00:17:14 +0200
commitf4ad25fefb33ad4930b09c685688ba71b4a21f32 (patch)
tree2c3f64b7d11ab92fdd8acf9c9c7769051250ce52 /src/gallium/drivers/nvc0
parentb4c7cd3fd6a8ae4b3c704e7c284e10fdb9746153 (diff)
nv50,nvc0: add new texture and render target formats
Diffstat (limited to 'src/gallium/drivers/nvc0')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_formats.c66
1 files changed, 61 insertions, 5 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_formats.c b/src/gallium/drivers/nvc0/nvc0_formats.c
index 6eaa7c2cb3e..678e9b563ee 100644
--- a/src/gallium/drivers/nvc0/nvc0_formats.c
+++ b/src/gallium/drivers/nvc0/nvc0_formats.c
@@ -145,24 +145,64 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
[PIPE_FORMAT_L8_SRGB] = { NV50_SURFACE_FORMAT_R8_UNORM,
A_(C0, C0, C0, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, 8, 0),
- SAMPLER_VIEW },
+ SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_I8_UNORM] = { NV50_SURFACE_FORMAT_R8_UNORM,
- A_(C0, C0, C0, C0, UNORM, UNORM, UNORM, UNORM, 8, 0),
+ [PIPE_FORMAT_L16_SNORM] = { NV50_SURFACE_FORMAT_R16_SNORM,
+ B_(C0, C0, C0, ONE_FLOAT, SNORM, SNORM, SNORM, SNORM, 16, 0),
SAMPLER_VIEW | RENDER_TARGET },
- [PIPE_FORMAT_I16_UNORM] = { NV50_SURFACE_FORMAT_R16_UNORM,
- A_(C0, C0, C0, C0, UNORM, UNORM, UNORM, UNORM, 16, 0),
+ [PIPE_FORMAT_L16_FLOAT] = { NV50_SURFACE_FORMAT_R16_FLOAT,
+ B_(C0, C0, C0, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 16, 0),
SAMPLER_VIEW | RENDER_TARGET },
+ [PIPE_FORMAT_L32_FLOAT] = { NV50_SURFACE_FORMAT_R32_FLOAT,
+ B_(C0, C0, C0, ONE_FLOAT, FLOAT, FLOAT, FLOAT, FLOAT, 32, 0),
+ SAMPLER_VIEW | RENDER_TARGET },
+
+ [PIPE_FORMAT_I8_UNORM] = { 0,
+ A_(C0, C0, C0, C0, UNORM, UNORM, UNORM, UNORM, 8, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_I16_UNORM] = { 0,
+ A_(C0, C0, C0, C0, UNORM, UNORM, UNORM, UNORM, 16, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_I16_SNORM] = { 0,
+ B_(C0, C0, C0, C0, SNORM, SNORM, SNORM, SNORM, 16, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_I16_FLOAT] = { 0,
+ B_(C0, C0, C0, C0, FLOAT, FLOAT, FLOAT, FLOAT, 16, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_I32_FLOAT] = { 0,
+ B_(C0, C0, C0, C0, FLOAT, FLOAT, FLOAT, FLOAT, 32, 0),
+ SAMPLER_VIEW },
+
[PIPE_FORMAT_A8_UNORM] = { NV50_SURFACE_FORMAT_A8_UNORM,
A_(ZERO, ZERO, ZERO, C0, UNORM, UNORM, UNORM, UNORM, 8, 0),
SAMPLER_VIEW | RENDER_TARGET },
+ [PIPE_FORMAT_A8_SNORM] = { 0,
+ A_(ZERO, ZERO, ZERO, C0, SNORM, SNORM, SNORM, SNORM, 8, 0),
+ SAMPLER_VIEW },
+
[PIPE_FORMAT_A16_UNORM] = { 0,
A_(ZERO, ZERO, ZERO, C0, UNORM, UNORM, UNORM, UNORM, 16, 0),
SAMPLER_VIEW },
+ [PIPE_FORMAT_A16_SNORM] = { 0,
+ A_(ZERO, ZERO, ZERO, C0, SNORM, SNORM, SNORM, SNORM, 16, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_A16_FLOAT] = { 0,
+ B_(ZERO, ZERO, ZERO, C0, FLOAT, FLOAT, FLOAT, FLOAT, 16, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_A32_FLOAT] = { 0,
+ B_(ZERO, ZERO, ZERO, C0, FLOAT, FLOAT, FLOAT, FLOAT, 32, 0),
+ SAMPLER_VIEW },
+
[PIPE_FORMAT_L8A8_UNORM] = { 0,
A_(C0, C0, C0, C1, UNORM, UNORM, UNORM, UNORM, 8_8, 0),
SAMPLER_VIEW },
@@ -175,6 +215,18 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
A_(C0, C0, C0, C1, UNORM, UNORM, UNORM, UNORM, 16_16, 0),
SAMPLER_VIEW },
+ [PIPE_FORMAT_L16A16_SNORM] = { 0,
+ A_(C0, C0, C0, C1, SNORM, SNORM, SNORM, SNORM, 16_16, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_L16A16_FLOAT] = { 0,
+ B_(C0, C0, C0, C1, FLOAT, FLOAT, FLOAT, FLOAT, 16_16, 0),
+ SAMPLER_VIEW },
+
+ [PIPE_FORMAT_L32A32_FLOAT] = { 0,
+ B_(C0, C0, C0, C1, FLOAT, FLOAT, FLOAT, FLOAT, 32_32, 0),
+ SAMPLER_VIEW },
+
[PIPE_FORMAT_L4A4_UNORM] = { 0,
B_(C0, C0, C0, C1, UNORM, UNORM, UNORM, UNORM, 4_4, 0),
SAMPLER_VIEW },
@@ -520,4 +572,8 @@ const struct nvc0_format nvc0_format_table[PIPE_FORMAT_COUNT] =
[PIPE_FORMAT_R1_UNORM] = { 0,
B_(C0, ZERO, ZERO, ONE_FLOAT, UNORM, UNORM, UNORM, UNORM, BITMAP_8X8, 0),
SAMPLER_VIEW },
+
+ [PIPE_FORMAT_A8B8G8R8_UNORM] = { 0,
+ B_(C3, C2, C1, C0, UNORM, UNORM, UNORM, UNORM, 8_8_8_8, 0),
+ SAMPLER_VIEW },
};