summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/nv50/nv50_formats.c96
1 files changed, 53 insertions, 43 deletions
diff --git a/src/gallium/drivers/nv50/nv50_formats.c b/src/gallium/drivers/nv50/nv50_formats.c
index 658f1c4c199..2f29ad808f9 100644
--- a/src/gallium/drivers/nv50/nv50_formats.c
+++ b/src/gallium/drivers/nv50/nv50_formats.c
@@ -40,24 +40,34 @@
* D: scanout/display target, blendable
* Z: depth/stencil
* V: vertex fetch
+ * I: image / surface, implies T
*/
#define U_V PIPE_BIND_VERTEX_BUFFER
#define U_T PIPE_BIND_SAMPLER_VIEW
+#define U_I PIPE_BIND_SHADER_RESOURCE | PIPE_BIND_COMPUTE_RESOURCE
#define U_TR PIPE_BIND_RENDER_TARGET | U_T
+#define U_IR U_TR | U_I
#define U_TB PIPE_BIND_BLENDABLE | U_TR
+#define U_IB PIPE_BIND_BLENDABLE | U_IR
#define U_TD PIPE_BIND_SCANOUT | PIPE_BIND_DISPLAY_TARGET | U_TB
#define U_TZ PIPE_BIND_DEPTH_STENCIL | U_T
#define U_TV U_V | U_T
#define U_TRV U_V | U_TR
+#define U_IRV U_V | U_IR
#define U_TBV U_V | U_TB
+#define U_IBV U_V | U_IB
#define U_TDV U_V | U_TD
#if NOUVEAU_DRIVER == 0xc0
# define U_TC U_TB
+# define U_IC U_IB
# define U_TCV U_TBV
+# define U_ICV U_IBV
# define U_tV U_TV
#else
# define U_TC U_TR
+# define U_IC U_IR
# define U_TCV U_TRV
+# define U_ICV U_IRV
# define U_tV U_V
#endif
@@ -163,7 +173,7 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
F3A(B8G8R8X8_UNORM, BGRX8_UNORM, C2, C1, C0, xx, UNORM, 8_8_8_8, TD),
C4A(B8G8R8A8_SRGB, BGRA8_SRGB, C2, C1, C0, C3, UNORM, 8_8_8_8, TD, 1),
F3A(B8G8R8X8_SRGB, BGRX8_SRGB, C2, C1, C0, xx, UNORM, 8_8_8_8, TD),
- C4A(R8G8B8A8_UNORM, RGBA8_UNORM, C0, C1, C2, C3, UNORM, 8_8_8_8, TBV, 0),
+ C4A(R8G8B8A8_UNORM, RGBA8_UNORM, C0, C1, C2, C3, UNORM, 8_8_8_8, IBV, 0),
F3A(R8G8B8X8_UNORM, RGBX8_UNORM, C0, C1, C2, xx, UNORM, 8_8_8_8, TB),
C4A(R8G8B8A8_SRGB, RGBA8_SRGB, C0, C1, C2, C3, UNORM, 8_8_8_8, TB, 0),
@@ -186,13 +196,13 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
F3B(R9G9B9E5_FLOAT, NONE, C0, C1, C2, xx, FLOAT, 9_9_9_E5, T),
C4A(R10G10B10A2_UNORM, RGB10_A2_UNORM, C0, C1, C2, C3, UNORM, 10_10_10_2,
- TBV, 0),
+ IBV, 0),
C4A(B10G10R10A2_UNORM, BGR10_A2_UNORM, C2, C1, C0, C3, UNORM, 10_10_10_2,
TBV, 1),
C4A(R10G10B10A2_SNORM, NONE, C0, C1, C2, C3, SNORM, 10_10_10_2, TV, 0),
C4A(B10G10R10A2_SNORM, NONE, C2, C1, C0, C3, SNORM, 10_10_10_2, TV, 1),
- F3B(R11G11B10_FLOAT, R11G11B10_FLOAT, C0, C1, C2, xx, FLOAT, 11_11_10, TB),
+ F3B(R11G11B10_FLOAT, R11G11B10_FLOAT, C0, C1, C2, xx, FLOAT, 11_11_10, IB),
F3B(L8_UNORM, R8_UNORM, C0, C0, C0, xx, UNORM, 8, TB),
F3B(L8_SRGB, R8_UNORM, C0, C0, C0, xx, UNORM, 8, TB),
@@ -268,62 +278,62 @@ const struct nv50_format nv50_format_table[PIPE_FORMAT_COUNT] =
C4B(LATC2_SNORM, NONE, C0, C0, C0, C1, SNORM, RGTC2, T),
C4A(R32G32B32A32_FLOAT, RGBA32_FLOAT, C0, C1, C2, C3, FLOAT, 32_32_32_32,
- TBV, 0),
+ IBV, 0),
C4A(R32G32B32A32_UNORM, NONE, C0, C1, C2, C3, UNORM, 32_32_32_32, TV, 0),
C4A(R32G32B32A32_SNORM, NONE, C0, C1, C2, C3, SNORM, 32_32_32_32, TV, 0),
C4A(R32G32B32A32_SINT, RGBA32_SINT, C0, C1, C2, C3, SINT, 32_32_32_32,
- TRV, 0),
+ IRV, 0),
C4A(R32G32B32A32_UINT, RGBA32_UINT, C0, C1, C2, C3, UINT, 32_32_32_32,
- TRV, 0),
+ IRV, 0),
- F2A(R32G32_FLOAT, RG32_FLOAT, C0, C1, xx, xx, FLOAT, 32_32, TBV),
+ F2A(R32G32_FLOAT, RG32_FLOAT, C0, C1, xx, xx, FLOAT, 32_32, IBV),
F2A(R32G32_UNORM, NONE, C0, C1, xx, xx, UNORM, 32_32, TV),
F2A(R32G32_SNORM, NONE, C0, C1, xx, xx, SNORM, 32_32, TV),
- I2A(R32G32_SINT, RG32_SINT, C0, C1, xx, xx, SINT, 32_32, TRV),
- I2A(R32G32_UINT, RG32_UINT, C0, C1, xx, xx, UINT, 32_32, TRV),
+ I2A(R32G32_SINT, RG32_SINT, C0, C1, xx, xx, SINT, 32_32, IRV),
+ I2A(R32G32_UINT, RG32_UINT, C0, C1, xx, xx, UINT, 32_32, IRV),
- F1A(R32_FLOAT, R32_FLOAT, C0, xx, xx, xx, FLOAT, 32, TBV),
+ F1A(R32_FLOAT, R32_FLOAT, C0, xx, xx, xx, FLOAT, 32, IBV),
F1A(R32_UNORM, NONE, C0, xx, xx, xx, UNORM, 32, TV),
F1A(R32_SNORM, NONE, C0, xx, xx, xx, SNORM, 32, TV),
- I1A(R32_SINT, R32_SINT, C0, xx, xx, xx, SINT, 32, TRV),
- I1A(R32_UINT, R32_UINT, C0, xx, xx, xx, UINT, 32, TRV),
+ I1A(R32_SINT, R32_SINT, C0, xx, xx, xx, SINT, 32, IRV),
+ I1A(R32_UINT, R32_UINT, C0, xx, xx, xx, UINT, 32, IRV),
C4A(R16G16B16A16_FLOAT, RGBA16_FLOAT, C0, C1, C2, C3, FLOAT, 16_16_16_16,
- TBV, 0),
+ IBV, 0),
C4A(R16G16B16A16_UNORM, RGBA16_UNORM, C0, C1, C2, C3, UNORM, 16_16_16_16,
- TCV, 0),
+ ICV, 0),
C4A(R16G16B16A16_SNORM, RGBA16_SNORM, C0, C1, C2, C3, SNORM, 16_16_16_16,
- TCV, 0),
+ ICV, 0),
C4A(R16G16B16A16_SINT, RGBA16_SINT, C0, C1, C2, C3, SINT, 16_16_16_16,
- TRV, 0),
+ IRV, 0),
C4A(R16G16B16A16_UINT, RGBA16_UINT, C0, C1, C2, C3, UINT, 16_16_16_16,
- TRV, 0),
-
- F2A(R16G16_FLOAT, RG16_FLOAT, C0, C1, xx, xx, FLOAT, 16_16, TBV),
- F2A(R16G16_UNORM, RG16_UNORM, C0, C1, xx, xx, UNORM, 16_16, TCV),
- F2A(R16G16_SNORM, RG16_SNORM, C0, C1, xx, xx, SNORM, 16_16, TCV),
- I2A(R16G16_SINT, RG16_SINT, C0, C1, xx, xx, SINT, 16_16, TRV),
- I2A(R16G16_UINT, RG16_UINT, C0, C1, xx, xx, UINT, 16_16, TRV),
-
- F1A(R16_FLOAT, R16_FLOAT, C0, xx, xx, xx, FLOAT, 16, TBV),
- F1A(R16_UNORM, R16_UNORM, C0, xx, xx, xx, UNORM, 16, TCV),
- F1A(R16_SNORM, R16_SNORM, C0, xx, xx, xx, SNORM, 16, TCV),
- I1A(R16_SINT, R16_SINT, C0, xx, xx, xx, SINT, 16, TRV),
- I1A(R16_UINT, R16_UINT, C0, xx, xx, xx, UINT, 16, TRV),
-
- C4A(R8G8B8A8_SNORM, RGBA8_SNORM, C0, C1, C2, C3, SNORM, 8_8_8_8, TCV, 0),
- C4A(R8G8B8A8_SINT, RGBA8_SINT, C0, C1, C2, C3, SINT, 8_8_8_8, TRV, 0),
- C4A(R8G8B8A8_UINT, RGBA8_UINT, C0, C1, C2, C3, UINT, 8_8_8_8, TRV, 0),
-
- F2A(R8G8_UNORM, RG8_UNORM, C0, C1, xx, xx, UNORM, 8_8, TBV),
- F2A(R8G8_SNORM, RG8_SNORM, C0, C1, xx, xx, SNORM, 8_8, TCV),
- I2A(R8G8_SINT, RG8_SINT, C0, C1, xx, xx, SINT, 8_8, TRV),
- I2A(R8G8_UINT, RG8_UINT, C0, C1, xx, xx, UINT, 8_8, TRV),
-
- F1A(R8_UNORM, R8_UNORM, C0, xx, xx, xx, UNORM, 8, TBV),
- F1A(R8_SNORM, R8_SNORM, C0, xx, xx, xx, SNORM, 8, TCV),
- I1A(R8_SINT, R8_SINT, C0, xx, xx, xx, SINT, 8, TRV),
- I1A(R8_UINT, R8_UINT, C0, xx, xx, xx, UINT, 8, TRV),
+ IRV, 0),
+
+ F2A(R16G16_FLOAT, RG16_FLOAT, C0, C1, xx, xx, FLOAT, 16_16, IBV),
+ F2A(R16G16_UNORM, RG16_UNORM, C0, C1, xx, xx, UNORM, 16_16, ICV),
+ F2A(R16G16_SNORM, RG16_SNORM, C0, C1, xx, xx, SNORM, 16_16, ICV),
+ I2A(R16G16_SINT, RG16_SINT, C0, C1, xx, xx, SINT, 16_16, IRV),
+ I2A(R16G16_UINT, RG16_UINT, C0, C1, xx, xx, UINT, 16_16, IRV),
+
+ F1A(R16_FLOAT, R16_FLOAT, C0, xx, xx, xx, FLOAT, 16, IBV),
+ F1A(R16_UNORM, R16_UNORM, C0, xx, xx, xx, UNORM, 16, ICV),
+ F1A(R16_SNORM, R16_SNORM, C0, xx, xx, xx, SNORM, 16, ICV),
+ I1A(R16_SINT, R16_SINT, C0, xx, xx, xx, SINT, 16, IRV),
+ I1A(R16_UINT, R16_UINT, C0, xx, xx, xx, UINT, 16, IRV),
+
+ C4A(R8G8B8A8_SNORM, RGBA8_SNORM, C0, C1, C2, C3, SNORM, 8_8_8_8, ICV, 0),
+ C4A(R8G8B8A8_SINT, RGBA8_SINT, C0, C1, C2, C3, SINT, 8_8_8_8, IRV, 0),
+ C4A(R8G8B8A8_UINT, RGBA8_UINT, C0, C1, C2, C3, UINT, 8_8_8_8, IRV, 0),
+
+ F2A(R8G8_UNORM, RG8_UNORM, C0, C1, xx, xx, UNORM, 8_8, IBV),
+ F2A(R8G8_SNORM, RG8_SNORM, C0, C1, xx, xx, SNORM, 8_8, ICV),
+ I2A(R8G8_SINT, RG8_SINT, C0, C1, xx, xx, SINT, 8_8, IRV),
+ I2A(R8G8_UINT, RG8_UINT, C0, C1, xx, xx, UINT, 8_8, IRV),
+
+ F1A(R8_UNORM, R8_UNORM, C0, xx, xx, xx, UNORM, 8, IBV),
+ F1A(R8_SNORM, R8_SNORM, C0, xx, xx, xx, SNORM, 8, ICV),
+ I1A(R8_SINT, R8_SINT, C0, xx, xx, xx, SINT, 8, IRV),
+ I1A(R8_UINT, R8_UINT, C0, xx, xx, xx, UINT, 8, IRV),
F3B(R8G8_B8G8_UNORM, NONE, C0, C1, C2, xx, UNORM, U8_YA8_V8_YB8, T),
F3B(G8R8_B8R8_UNORM, NONE, C1, C0, C2, xx, UNORM, U8_YA8_V8_YB8, T),