summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharmaine Lee <[email protected]>2017-06-26 14:18:33 -0600
committerBrian Paul <[email protected]>2017-06-27 07:49:03 -0600
commitb2e78e79d7c1127af1eb03db431ae69032ca9561 (patch)
tree9df8ec21e7ffb52af7d19361cffb73def73ad8fe
parent122ca27a48400fe2efe790ecf46e91b9c9b88108 (diff)
svga: clean up format_cap_table
Per Jose's suggestion, this patch cleans up format_cap_table to remove the unnecessary default cap value for vgpu10 formats since those devcap values can be retrieved from the device. Tested with MTT conform, glretrace, piglit in HWv13 and HWv8. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
-rw-r--r--src/gallium/drivers/svga/svga_format.c495
1 files changed, 92 insertions, 403 deletions
diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c
index 8c73a623e1f..a914b23bff9 100644
--- a/src/gallium/drivers/svga/svga_format.c
+++ b/src/gallium/drivers/svga/svga_format.c
@@ -900,179 +900,116 @@ static const struct format_cap format_cap_table[] = {
"SVGA3D_UYVY",
SVGA3D_UYVY,
SVGA3D_DEVCAP_SURFACEFMT_UYVY,
- 0, 0, 0,
- 0
+ 0, 0, 0, 0
},
{
"SVGA3D_YUY2",
SVGA3D_YUY2,
SVGA3D_DEVCAP_SURFACEFMT_YUY2,
- 0, 0, 0,
- 0
+ 0, 0, 0, 0
},
{
"SVGA3D_NV12",
SVGA3D_NV12,
SVGA3D_DEVCAP_SURFACEFMT_NV12,
- 0, 0, 0,
- 0
+ 0, 0, 0, 0
},
{
"SVGA3D_AYUV",
SVGA3D_AYUV,
SVGA3D_DEVCAP_SURFACEFMT_AYUV,
- 0, 0, 0,
- 0
+ 0, 0, 0, 0
},
{
"SVGA3D_R32G32B32A32_TYPELESS",
SVGA3D_R32G32B32A32_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R32G32B32A32_TYPELESS,
- 1, 1, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 16, 0
},
{
"SVGA3D_R32G32B32A32_UINT",
SVGA3D_R32G32B32A32_UINT,
SVGA3D_DEVCAP_DXFMT_R32G32B32A32_UINT,
- 1, 1, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 16, 0
},
{
"SVGA3D_R32G32B32A32_SINT",
SVGA3D_R32G32B32A32_SINT,
SVGA3D_DEVCAP_DXFMT_R32G32B32A32_SINT,
- 1, 1, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 16, 0
},
{
"SVGA3D_R32G32B32_TYPELESS",
SVGA3D_R32G32B32_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R32G32B32_TYPELESS,
- 1, 1, 12,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 12, 0
},
{
"SVGA3D_R32G32B32_FLOAT",
SVGA3D_R32G32B32_FLOAT,
SVGA3D_DEVCAP_DXFMT_R32G32B32_FLOAT,
- 1, 1, 12,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 12, 0
},
{
"SVGA3D_R32G32B32_UINT",
SVGA3D_R32G32B32_UINT,
SVGA3D_DEVCAP_DXFMT_R32G32B32_UINT,
- 1, 1, 12,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 12, 0
},
{
"SVGA3D_R32G32B32_SINT",
SVGA3D_R32G32B32_SINT,
SVGA3D_DEVCAP_DXFMT_R32G32B32_SINT,
- 1, 1, 12,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 12, 0
},
{
"SVGA3D_R16G16B16A16_TYPELESS",
SVGA3D_R16G16B16A16_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R16G16B16A16_TYPELESS,
- 1, 1, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 8, 0
},
{
"SVGA3D_R16G16B16A16_UINT",
SVGA3D_R16G16B16A16_UINT,
SVGA3D_DEVCAP_DXFMT_R16G16B16A16_UINT,
- 1, 1, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 8, 0
},
{
"SVGA3D_R16G16B16A16_SNORM",
SVGA3D_R16G16B16A16_SNORM,
SVGA3D_DEVCAP_DXFMT_R16G16B16A16_SNORM,
- 1, 1, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 8, 0
},
{
"SVGA3D_R16G16B16A16_SINT",
SVGA3D_R16G16B16A16_SINT,
SVGA3D_DEVCAP_DXFMT_R16G16B16A16_SINT,
- 1, 1, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 8, 0
},
{
"SVGA3D_R32G32_TYPELESS",
SVGA3D_R32G32_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R32G32_TYPELESS,
- 1, 1, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 8, 0
},
{
"SVGA3D_R32G32_UINT",
SVGA3D_R32G32_UINT,
SVGA3D_DEVCAP_DXFMT_R32G32_UINT,
- 1, 1, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 8, 0
},
{
"SVGA3D_R32G32_SINT",
SVGA3D_R32G32_SINT,
SVGA3D_DEVCAP_DXFMT_R32G32_SINT,
1, 1, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 0
},
{
"SVGA3D_R32G8X24_TYPELESS",
SVGA3D_R32G8X24_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R32G8X24_TYPELESS,
- 1, 1, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_ZSTENCIL
+ 1, 1, 8, 0
},
{
/* Special case: no devcap / report sampler and depth/stencil ability
@@ -1102,132 +1039,79 @@ static const struct format_cap format_cap_table[] = {
"SVGA3D_X32_TYPELESS_G8X24_UINT",
SVGA3D_X32_TYPELESS_G8X24_UINT,
SVGA3D_DEVCAP_DXFMT_X32_TYPELESS_G8X24_UINT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R10G10B10A2_TYPELESS",
SVGA3D_R10G10B10A2_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R10G10B10A2_TYPELESS,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R10G10B10A2_UINT",
SVGA3D_R10G10B10A2_UINT,
SVGA3D_DEVCAP_DXFMT_R10G10B10A2_UINT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R11G11B10_FLOAT",
SVGA3D_R11G11B10_FLOAT,
SVGA3D_DEVCAP_DXFMT_R11G11B10_FLOAT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R8G8B8A8_TYPELESS",
SVGA3D_R8G8B8A8_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R8G8B8A8_TYPELESS,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R8G8B8A8_UNORM",
SVGA3D_R8G8B8A8_UNORM,
SVGA3D_DEVCAP_DXFMT_R8G8B8A8_UNORM,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R8G8B8A8_UNORM_SRGB",
SVGA3D_R8G8B8A8_UNORM_SRGB,
SVGA3D_DEVCAP_DXFMT_R8G8B8A8_UNORM_SRGB,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R8G8B8A8_UINT",
SVGA3D_R8G8B8A8_UINT,
SVGA3D_DEVCAP_DXFMT_R8G8B8A8_UINT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R8G8B8A8_SINT",
SVGA3D_R8G8B8A8_SINT,
SVGA3D_DEVCAP_DXFMT_R8G8B8A8_SINT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R16G16_TYPELESS",
SVGA3D_R16G16_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R16G16_TYPELESS,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R16G16_UINT",
SVGA3D_R16G16_UINT,
SVGA3D_DEVCAP_DXFMT_R16G16_UINT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R16G16_SINT",
SVGA3D_R16G16_SINT,
SVGA3D_DEVCAP_DXFMT_R16G16_SINT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R32_TYPELESS",
SVGA3D_R32_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R32_TYPELESS,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_ZSTENCIL |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
/* Special case: no devcap / report sampler and depth/stencil ability
@@ -1245,31 +1129,19 @@ static const struct format_cap format_cap_table[] = {
"SVGA3D_R32_UINT",
SVGA3D_R32_UINT,
SVGA3D_DEVCAP_DXFMT_R32_UINT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R32_SINT",
SVGA3D_R32_SINT,
SVGA3D_DEVCAP_DXFMT_R32_SINT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R24G8_TYPELESS",
SVGA3D_R24G8_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R24G8_TYPELESS,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_ZSTENCIL
+ 1, 1, 4, 0
},
{
/* Special case: no devcap / report sampler and depth/stencil ability
@@ -1299,152 +1171,91 @@ static const struct format_cap format_cap_table[] = {
"SVGA3D_X24_TYPELESS_G8_UINT",
SVGA3D_X24_TYPELESS_G8_UINT,
SVGA3D_DEVCAP_DXFMT_X24_TYPELESS_G8_UINT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_ZSTENCIL
+ 1, 1, 4, 0
},
{
"SVGA3D_R8G8_TYPELESS",
SVGA3D_R8G8_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R8G8_TYPELESS,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_R8G8_UNORM",
SVGA3D_R8G8_UNORM,
SVGA3D_DEVCAP_DXFMT_R8G8_UNORM,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_R8G8_UINT",
SVGA3D_R8G8_UINT,
SVGA3D_DEVCAP_DXFMT_R8G8_UINT,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_R8G8_SINT",
SVGA3D_R8G8_SINT,
SVGA3D_DEVCAP_DXFMT_R8G8_SINT,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_R16_TYPELESS",
SVGA3D_R16_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R16_TYPELESS,
- 1, 1, 2,
- SVGA3DFORMAT_OP_ZSTENCIL |
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_R16_UNORM",
SVGA3D_R16_UNORM,
SVGA3D_DEVCAP_DXFMT_R16_UNORM,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_R16_UINT",
SVGA3D_R16_UINT,
SVGA3D_DEVCAP_DXFMT_R16_UINT,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_R16_SNORM",
SVGA3D_R16_SNORM,
SVGA3D_DEVCAP_DXFMT_R16_SNORM,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_R16_SINT",
SVGA3D_R16_SINT,
SVGA3D_DEVCAP_DXFMT_R16_SINT,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_R8_TYPELESS",
SVGA3D_R8_TYPELESS,
SVGA3D_DEVCAP_DXFMT_R8_TYPELESS,
- 1, 1, 1,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 1, 0
},
{
"SVGA3D_R8_UNORM",
SVGA3D_R8_UNORM,
SVGA3D_DEVCAP_DXFMT_R8_UNORM,
- 1, 1, 1,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 1, 0
},
{
"SVGA3D_R8_UINT",
SVGA3D_R8_UINT,
SVGA3D_DEVCAP_DXFMT_R8_UINT,
- 1, 1, 1,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 1, 0
},
{
"SVGA3D_R8_SNORM",
SVGA3D_R8_SNORM,
SVGA3D_DEVCAP_DXFMT_R8_SNORM,
- 1, 1, 1,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 1, 0
},
{
"SVGA3D_R8_SINT",
SVGA3D_R8_SINT,
SVGA3D_DEVCAP_DXFMT_R8_SINT,
- 1, 1, 1,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 1, 0
},
{
"SVGA3D_P8",
@@ -1454,11 +1265,7 @@ static const struct format_cap format_cap_table[] = {
"SVGA3D_R9G9B9E5_SHAREDEXP",
SVGA3D_R9G9B9E5_SHAREDEXP,
SVGA3D_DEVCAP_DXFMT_R9G9B9E5_SHAREDEXP,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R8G8_B8G8_UNORM",
@@ -1472,56 +1279,42 @@ static const struct format_cap format_cap_table[] = {
"SVGA3D_BC1_TYPELESS",
SVGA3D_BC1_TYPELESS,
SVGA3D_DEVCAP_DXFMT_BC1_TYPELESS,
- 4, 4, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 8, 0
},
{
"SVGA3D_BC1_UNORM_SRGB",
SVGA3D_BC1_UNORM_SRGB,
SVGA3D_DEVCAP_DXFMT_BC1_UNORM_SRGB,
- 4, 4, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 8, 0
},
{
"SVGA3D_BC2_TYPELESS",
SVGA3D_BC2_TYPELESS,
SVGA3D_DEVCAP_DXFMT_BC2_TYPELESS,
- 4, 4, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 16, 0
},
{
"SVGA3D_BC2_UNORM_SRGB",
SVGA3D_BC2_UNORM_SRGB,
SVGA3D_DEVCAP_DXFMT_BC2_UNORM_SRGB,
- 4, 4, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 16, 0
},
{
"SVGA3D_BC3_TYPELESS",
SVGA3D_BC3_TYPELESS,
SVGA3D_DEVCAP_DXFMT_BC3_TYPELESS,
- 4, 4, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 16, 0
},
{
"SVGA3D_BC3_UNORM_SRGB",
SVGA3D_BC3_UNORM_SRGB,
- 4, 4, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 16, 0
},
{
"SVGA3D_BC4_TYPELESS",
SVGA3D_BC4_TYPELESS,
SVGA3D_DEVCAP_DXFMT_BC4_TYPELESS,
- 4, 4, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 8, 0
},
{
"SVGA3D_ATI1",
@@ -1531,17 +1324,13 @@ static const struct format_cap format_cap_table[] = {
"SVGA3D_BC4_SNORM",
SVGA3D_BC4_SNORM,
SVGA3D_DEVCAP_DXFMT_BC4_SNORM,
- 4, 4, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 8, 0
},
{
"SVGA3D_BC5_TYPELESS",
SVGA3D_BC5_TYPELESS,
SVGA3D_DEVCAP_DXFMT_BC5_TYPELESS,
- 4, 4, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 16, 0
},
{
"SVGA3D_ATI2",
@@ -1551,9 +1340,7 @@ static const struct format_cap format_cap_table[] = {
"SVGA3D_BC5_SNORM",
SVGA3D_BC5_SNORM,
SVGA3D_DEVCAP_DXFMT_BC5_SNORM,
- 4, 4, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 16, 0
},
{
"SVGA3D_R10G10B10_XR_BIAS_A2_UNORM",
@@ -1563,62 +1350,43 @@ static const struct format_cap format_cap_table[] = {
"SVGA3D_B8G8R8A8_TYPELESS",
SVGA3D_B8G8R8A8_TYPELESS,
SVGA3D_DEVCAP_DXFMT_B8G8R8A8_TYPELESS,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_B8G8R8A8_UNORM_SRGB",
SVGA3D_B8G8R8A8_UNORM_SRGB,
SVGA3D_DEVCAP_DXFMT_B8G8R8A8_UNORM_SRGB,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_B8G8R8X8_TYPELESS",
SVGA3D_B8G8R8X8_TYPELESS,
SVGA3D_DEVCAP_DXFMT_B8G8R8X8_TYPELESS,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_B8G8R8X8_UNORM_SRGB",
SVGA3D_B8G8R8X8_UNORM_SRGB,
SVGA3D_DEVCAP_DXFMT_B8G8R8X8_UNORM_SRGB,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_Z_DF16",
SVGA3D_Z_DF16,
SVGA3D_DEVCAP_SURFACEFMT_Z_DF16,
- 1, 1, 2,
- 0
+ 1, 1, 2, 0
},
{
"SVGA3D_Z_DF24",
SVGA3D_Z_DF24,
SVGA3D_DEVCAP_SURFACEFMT_Z_DF24,
- 1, 1, 4,
- 0
+ 1, 1, 4, 0
},
{
"SVGA3D_Z_D24S8_INT",
SVGA3D_Z_D24S8_INT,
SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8_INT,
- 1, 1, 4,
- 0
+ 1, 1, 4, 0
},
{
"SVGA3D_YV12",
@@ -1628,121 +1396,73 @@ static const struct format_cap format_cap_table[] = {
"SVGA3D_R32G32B32A32_FLOAT",
SVGA3D_R32G32B32A32_FLOAT,
SVGA3D_DEVCAP_DXFMT_R32G32B32A32_FLOAT,
- 1, 1, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 16, 0
},
{
"SVGA3D_R16G16B16A16_FLOAT",
SVGA3D_R16G16B16A16_FLOAT,
SVGA3D_DEVCAP_DXFMT_R16G16B16A16_FLOAT,
- 1, 1, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 8, 0
},
{
"SVGA3D_R16G16B16A16_UNORM",
SVGA3D_R16G16B16A16_UNORM,
SVGA3D_DEVCAP_DXFMT_R16G16B16A16_UNORM,
- 1, 1, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 8, 0
},
{
"SVGA3D_R32G32_FLOAT",
SVGA3D_R32G32_FLOAT,
SVGA3D_DEVCAP_DXFMT_R32G32_FLOAT,
- 1, 1, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 8, 0
},
{
"SVGA3D_R10G10B10A2_UNORM",
SVGA3D_R10G10B10A2_UNORM,
SVGA3D_DEVCAP_DXFMT_R10G10B10A2_UNORM,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R8G8B8A8_SNORM",
SVGA3D_R8G8B8A8_SNORM,
SVGA3D_DEVCAP_DXFMT_R8G8B8A8_SNORM,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R16G16_FLOAT",
SVGA3D_R16G16_FLOAT,
SVGA3D_DEVCAP_DXFMT_R16G16_FLOAT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R16G16_UNORM",
SVGA3D_R16G16_UNORM,
SVGA3D_DEVCAP_DXFMT_R16G16_UNORM,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R16G16_SNORM",
SVGA3D_R16G16_SNORM,
SVGA3D_DEVCAP_DXFMT_R16G16_SNORM,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R32_FLOAT",
SVGA3D_R32_FLOAT,
SVGA3D_DEVCAP_DXFMT_R32_FLOAT,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_R8G8_SNORM",
SVGA3D_R8G8_SNORM,
SVGA3D_DEVCAP_DXFMT_R8G8_SNORM,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_R16_FLOAT",
SVGA3D_R16_FLOAT,
SVGA3D_DEVCAP_DXFMT_R16_FLOAT,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_D16_UNORM",
@@ -1758,94 +1478,61 @@ static const struct format_cap format_cap_table[] = {
"SVGA3D_A8_UNORM",
SVGA3D_A8_UNORM,
SVGA3D_DEVCAP_DXFMT_A8_UNORM,
- 1, 1, 1,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 1, 0
},
{
"SVGA3D_BC1_UNORM",
SVGA3D_BC1_UNORM,
SVGA3D_DEVCAP_DXFMT_BC1_UNORM,
- 4, 4, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 8, 0
},
{
"SVGA3D_BC2_UNORM",
SVGA3D_BC2_UNORM,
SVGA3D_DEVCAP_DXFMT_BC2_UNORM,
- 4, 4, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 16, 0
},
{
"SVGA3D_BC3_UNORM",
SVGA3D_BC3_UNORM,
SVGA3D_DEVCAP_DXFMT_BC3_UNORM,
- 4, 4, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 16, 0
},
{
"SVGA3D_B5G6R5_UNORM",
SVGA3D_B5G6R5_UNORM,
SVGA3D_DEVCAP_DXFMT_B5G6R5_UNORM,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_DISPLAYMODE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_B5G5R5A1_UNORM",
SVGA3D_B5G5R5A1_UNORM,
SVGA3D_DEVCAP_DXFMT_B5G5R5A1_UNORM,
- 1, 1, 2,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_DISPLAYMODE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 2, 0
},
{
"SVGA3D_B8G8R8A8_UNORM",
SVGA3D_B8G8R8A8_UNORM,
SVGA3D_DEVCAP_DXFMT_B8G8R8A8_UNORM,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_B8G8R8X8_UNORM",
SVGA3D_B8G8R8X8_UNORM,
SVGA3D_DEVCAP_DXFMT_B8G8R8X8_UNORM,
- 1, 1, 4,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE |
- SVGA3DFORMAT_OP_VOLUMETEXTURE |
- SVGA3DFORMAT_OP_DISPLAYMODE |
- SVGA3DFORMAT_OP_OFFSCREEN_RENDERTARGET
+ 1, 1, 4, 0
},
{
"SVGA3D_BC4_UNORM",
SVGA3D_BC4_UNORM,
SVGA3D_DEVCAP_DXFMT_BC4_UNORM,
- 4, 4, 8,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 8, 0
},
{
"SVGA3D_BC5_UNORM",
SVGA3D_BC5_UNORM,
SVGA3D_DEVCAP_DXFMT_BC5_UNORM,
- 4, 4, 16,
- SVGA3DFORMAT_OP_TEXTURE |
- SVGA3DFORMAT_OP_CUBETEXTURE
+ 4, 4, 16, 0
}
};
@@ -1924,6 +1611,8 @@ svga_get_format_cap(struct svga_screen *ss,
assert(entry->format == format);
if (entry->devcap && sws->get_cap(sws, entry->devcap, &result)) {
+ assert(format < SVGA3D_UYVY || entry->defaultOperations == 0);
+
/* Explicitly advertised format */
if (entry->devcap > SVGA3D_DEVCAP_DX) {
/* Translate DX/VGPU10 format cap to VGPU9 cap */