diff options
author | Christoph Bumiller <[email protected]> | 2011-10-13 19:31:51 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-10-21 23:00:37 +0200 |
commit | 77574bf0f46716490be741d8095a8d184eff6076 (patch) | |
tree | bc984863c0fd9a21ce5e5f4b48afdc385c2a4227 /src | |
parent | 6ab6c43079083c811761241b901d07f9ad2c9aff (diff) |
d3d1x: update format mapping table
Use the proper integer formats.
Fix mapping of some PIPE depth formats to DXGI.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/d3d1x/d3d1xstutil/src/dxgi_enums.cpp | 90 |
2 files changed, 55 insertions, 37 deletions
diff --git a/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h b/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h index e197c0ca797..1e96066874b 100644 --- a/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h +++ b/src/gallium/state_trackers/d3d1x/d3d1xstutil/include/d3d1xstutil.h @@ -982,7 +982,7 @@ struct GalliumMultiPrivateDataComObject : public GalliumMultiComObject<BaseClass } }; -#define DXGI_FORMAT_COUNT 100 +#define DXGI_FORMAT_COUNT 116 extern pipe_format dxgi_to_pipe_format[DXGI_FORMAT_COUNT]; extern DXGI_FORMAT pipe_to_dxgi_format[PIPE_FORMAT_COUNT]; diff --git a/src/gallium/state_trackers/d3d1x/d3d1xstutil/src/dxgi_enums.cpp b/src/gallium/state_trackers/d3d1x/d3d1xstutil/src/dxgi_enums.cpp index a6a8eb7022a..d6dcae08666 100644 --- a/src/gallium/state_trackers/d3d1x/d3d1xstutil/src/dxgi_enums.cpp +++ b/src/gallium/state_trackers/d3d1x/d3d1xstutil/src/dxgi_enums.cpp @@ -32,70 +32,70 @@ pipe_format dxgi_to_pipe_format[DXGI_FORMAT_COUNT] = { PIPE_FORMAT_NONE, - PIPE_FORMAT_R32G32B32A32_FLOAT, /* TYPELESS */ + PIPE_FORMAT_R32G32B32A32_UINT, /* TYPELESS */ PIPE_FORMAT_R32G32B32A32_FLOAT, - PIPE_FORMAT_R32G32B32A32_USCALED, - PIPE_FORMAT_R32G32B32A32_SSCALED, - PIPE_FORMAT_R32G32B32_FLOAT, /* TYPELESS */ + PIPE_FORMAT_R32G32B32A32_UINT, + PIPE_FORMAT_R32G32B32A32_SINT, + PIPE_FORMAT_R32G32B32_UINT, /* TYPELESS */ PIPE_FORMAT_R32G32B32_FLOAT, - PIPE_FORMAT_R32G32B32_USCALED, - PIPE_FORMAT_R32G32B32_SSCALED, - PIPE_FORMAT_R16G16B16A16_FLOAT, /* TYPELESS */ + PIPE_FORMAT_R32G32B32_UINT, + PIPE_FORMAT_R32G32B32_SINT, + PIPE_FORMAT_R16G16B16A16_UINT, /* TYPELESS */ PIPE_FORMAT_R16G16B16A16_FLOAT, PIPE_FORMAT_R16G16B16A16_UNORM, - PIPE_FORMAT_R16G16B16A16_USCALED, + PIPE_FORMAT_R16G16B16A16_UINT, PIPE_FORMAT_R16G16B16A16_SNORM, - PIPE_FORMAT_R16G16B16A16_SSCALED, - PIPE_FORMAT_R32G32_FLOAT, /* TYPELESS */ + PIPE_FORMAT_R16G16B16A16_SINT, + PIPE_FORMAT_R32G32_UINT, /* TYPELESS */ PIPE_FORMAT_R32G32_FLOAT, - PIPE_FORMAT_R32G32_USCALED, - PIPE_FORMAT_R32G32_SSCALED, - PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, /* PIPE_FORMAT_R32G8X24_FLOAT_TYPELESS */ + PIPE_FORMAT_R32G32_UINT, + PIPE_FORMAT_R32G32_SINT, + PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, /* PIPE_FORMAT_R32_G8X24_TYPELESS */ PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, - PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, /* PIPE_FORMAT_R32_FLOAT_X8X24_TYPELESS */ - PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, /* PIPE_FORMAT_X32_TYPELESS_G8X24_UINT */ + PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, /* PIPE_FORMAT_R32_X8X24_FLOAT */ + PIPE_FORMAT_Z32_FLOAT_S8X24_UINT, /* PIPE_FORMAT_X32_G8X24_UINT */ PIPE_FORMAT_R10G10B10A2_UNORM, /* TYPELESS */ PIPE_FORMAT_R10G10B10A2_UNORM, - PIPE_FORMAT_R10G10B10A2_USCALED, + PIPE_FORMAT_NONE, /* PIPE_FORMAT_R10G10B10A2_UINT */ PIPE_FORMAT_R11G11B10_FLOAT, - PIPE_FORMAT_R8G8B8A8_UNORM, /* TYPELESS */ + PIPE_FORMAT_R8G8B8A8_UINT, /* TYPELESS */ PIPE_FORMAT_R8G8B8A8_UNORM, PIPE_FORMAT_R8G8B8A8_SRGB, - PIPE_FORMAT_R8G8B8A8_USCALED, + PIPE_FORMAT_R8G8B8A8_UINT, PIPE_FORMAT_R8G8B8A8_SNORM, - PIPE_FORMAT_R8G8B8A8_SSCALED, - PIPE_FORMAT_R16G16_FLOAT, /* TYPELESS */ + PIPE_FORMAT_R8G8B8A8_SINT, + PIPE_FORMAT_R16G16_UINT, /* TYPELESS */ PIPE_FORMAT_R16G16_FLOAT, PIPE_FORMAT_R16G16_UNORM, - PIPE_FORMAT_R16G16_USCALED, + PIPE_FORMAT_R16G16_UINT, PIPE_FORMAT_R16G16_SNORM, - PIPE_FORMAT_R16G16_SSCALED, - PIPE_FORMAT_R32_FLOAT, /* TYPELESS */ + PIPE_FORMAT_R16G16_SINT, + PIPE_FORMAT_R32_UINT, /* TYPELESS */ PIPE_FORMAT_Z32_FLOAT, PIPE_FORMAT_R32_FLOAT, - PIPE_FORMAT_R32_USCALED, - PIPE_FORMAT_R32_SSCALED, + PIPE_FORMAT_R32_UINT, + PIPE_FORMAT_R32_SINT, PIPE_FORMAT_Z24_UNORM_S8_UINT, /* PIPE_FORMAT_R24G8_TYPELESS */ PIPE_FORMAT_Z24_UNORM_S8_UINT, - PIPE_FORMAT_Z24X8_UNORM, /* PIPE_FORMAT_R24_UNORM_X8_TYPELESS */ - PIPE_FORMAT_Z24_UNORM_S8_UINT, /* PIPE_FORMAT_X24_TYPELESS_G8_UINT */ - PIPE_FORMAT_R8G8_UNORM, /* TYPELESS */ + PIPE_FORMAT_Z24X8_UNORM, /* PIPE_FORMAT_R24X8_UNORM */ + PIPE_FORMAT_Z24_UNORM_S8_UINT, /* PIPE_FORMAT_X24G8_UINT */ + PIPE_FORMAT_R8G8_UINT, /* TYPELESS */ PIPE_FORMAT_R8G8_UNORM, - PIPE_FORMAT_R8G8_USCALED, + PIPE_FORMAT_R8G8_UINT, PIPE_FORMAT_R8G8_SNORM, - PIPE_FORMAT_R8G8_SSCALED, - PIPE_FORMAT_R16_FLOAT, /* TYPELESS */ + PIPE_FORMAT_R8G8_SINT, + PIPE_FORMAT_R16_UINT, /* TYPELESS */ PIPE_FORMAT_R16_FLOAT, PIPE_FORMAT_Z16_UNORM, PIPE_FORMAT_R16_UNORM, - PIPE_FORMAT_R16_USCALED, + PIPE_FORMAT_R16_UINT, PIPE_FORMAT_R16_SNORM, - PIPE_FORMAT_R16_SSCALED, - PIPE_FORMAT_R8_UNORM, /* TYPELESS */ + PIPE_FORMAT_R16_SINT, + PIPE_FORMAT_R8_UINT, /* TYPELESS */ PIPE_FORMAT_R8_UNORM, - PIPE_FORMAT_R8_USCALED, + PIPE_FORMAT_R8_UINT, PIPE_FORMAT_R8_SNORM, - PIPE_FORMAT_R8_SSCALED, + PIPE_FORMAT_R8_SINT, PIPE_FORMAT_A8_UNORM, PIPE_FORMAT_R1_UNORM, PIPE_FORMAT_R9G9B9E5_FLOAT, @@ -131,6 +131,22 @@ pipe_format dxgi_to_pipe_format[DXGI_FORMAT_COUNT] = PIPE_FORMAT_NONE, /* PIPE_FORMAT_BC7_TYPELESS */ PIPE_FORMAT_NONE, /* PIPE_FORMAT_BC7_UNORM */ PIPE_FORMAT_NONE, /* PIPE_FORMAT_BC7_UNORM_SRGB */ + PIPE_FORMAT_AYUV, + PIPE_FORMAT_NONE, /* PIPE_FORMAT_Y410 */ + PIPE_FORMAT_NONE, /* PIPE_FORMAT_Y416 */ + PIPE_FORMAT_NV12, + PIPE_FORMAT_NONE, /* PIPE_FORMAT_P010 */ + PIPE_FORMAT_NONE, /* PIPE_FORMAT_P016 */ + PIPE_FORMAT_NONE, /* PIPE_FORMAT_420_OPAQUE */ + PIPE_FORMAT_NONE, /* PIPE_FORMAT_YUV2 */ + PIPE_FORMAT_NONE, /* PIPE_FORMAT_Y210 */ + PIPE_FORMAT_NONE, /* PIPE_FORMAT_Y216 */ + PIPE_FORMAT_NONE, /* PIPE_FORMAT_NV11 */ + PIPE_FORMAT_NONE, /* PIPE_FORMAT_AI44 (palettized) */ + PIPE_FORMAT_NONE, /* PIPE_FORMAT_IA44 (palettized) */ + PIPE_FORMAT_NONE, /* PIPE_FORMAT_P8 (palettized) */ + PIPE_FORMAT_NONE, /* PIPE_FORMAT_A8P8 (palettized) */ + PIPE_FORMAT_B4G4R4A4_UNORM, }; DXGI_FORMAT pipe_to_dxgi_format[PIPE_FORMAT_COUNT]; @@ -142,6 +158,8 @@ void init_pipe_to_dxgi_format() for(unsigned i = 0; i < DXGI_FORMAT_COUNT; ++i) pipe_to_dxgi_format[dxgi_to_pipe_format[i]] = (DXGI_FORMAT)i; pipe_to_dxgi_format[PIPE_FORMAT_NONE] = DXGI_FORMAT_UNKNOWN; + pipe_to_dxgi_format[PIPE_FORMAT_Z32_FLOAT_S8X24_UINT] = DXGI_FORMAT_D32_FLOAT_S8X24_UINT; + pipe_to_dxgi_format[PIPE_FORMAT_Z24_UNORM_S8_UINT] = DXGI_FORMAT_D24_UNORM_S8_UINT; pipe_to_dxgi_format_initialized = 1; } } |