mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
wined3d: Use the DXGI naming convention for all formats.
This commit is contained in:
parent
a25ac586c6
commit
47c84f4f7f
@ -46,37 +46,37 @@ D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
|
||||
switch(format)
|
||||
{
|
||||
case WINED3DFMT_UNKNOWN: return D3DFMT_UNKNOWN;
|
||||
case WINED3DFMT_R8G8B8: return D3DFMT_R8G8B8;
|
||||
case WINED3DFMT_A8R8G8B8: return D3DFMT_A8R8G8B8;
|
||||
case WINED3DFMT_X8R8G8B8: return D3DFMT_X8R8G8B8;
|
||||
case WINED3DFMT_R5G6B5: return D3DFMT_R5G6B5;
|
||||
case WINED3DFMT_X1R5G5B5: return D3DFMT_X1R5G5B5;
|
||||
case WINED3DFMT_A1R5G5B5: return D3DFMT_A1R5G5B5;
|
||||
case WINED3DFMT_A4R4G4B4: return D3DFMT_A4R4G4B4;
|
||||
case WINED3DFMT_R3G3B2: return D3DFMT_R3G3B2;
|
||||
case WINED3DFMT_B8G8R8_UNORM: return D3DFMT_R8G8B8;
|
||||
case WINED3DFMT_B8G8R8A8_UNORM: return D3DFMT_A8R8G8B8;
|
||||
case WINED3DFMT_B8G8R8X8_UNORM: return D3DFMT_X8R8G8B8;
|
||||
case WINED3DFMT_B5G6R5_UNORM: return D3DFMT_R5G6B5;
|
||||
case WINED3DFMT_B5G5R5X1_UNORM: return D3DFMT_X1R5G5B5;
|
||||
case WINED3DFMT_B5G5R5A1_UNORM: return D3DFMT_A1R5G5B5;
|
||||
case WINED3DFMT_B4G4R4A4_UNORM: return D3DFMT_A4R4G4B4;
|
||||
case WINED3DFMT_B2G3R3_UNORM: return D3DFMT_R3G3B2;
|
||||
case WINED3DFMT_A8_UNORM: return D3DFMT_A8;
|
||||
case WINED3DFMT_A8R3G3B2: return D3DFMT_A8R3G3B2;
|
||||
case WINED3DFMT_X4R4G4B4: return D3DFMT_X4R4G4B4;
|
||||
case WINED3DFMT_B2G3R3A8_UNORM: return D3DFMT_A8R3G3B2;
|
||||
case WINED3DFMT_B4G4R4X4_UNORM: return D3DFMT_X4R4G4B4;
|
||||
case WINED3DFMT_R10G10B10A2_UNORM: return D3DFMT_A2B10G10R10;
|
||||
case WINED3DFMT_R16G16_UNORM: return D3DFMT_G16R16;
|
||||
case WINED3DFMT_A8P8: return D3DFMT_A8P8;
|
||||
case WINED3DFMT_P8: return D3DFMT_P8;
|
||||
case WINED3DFMT_L8: return D3DFMT_L8;
|
||||
case WINED3DFMT_A8L8: return D3DFMT_A8L8;
|
||||
case WINED3DFMT_A4L4: return D3DFMT_A4L4;
|
||||
case WINED3DFMT_P8_UINT_A8_UNORM: return D3DFMT_A8P8;
|
||||
case WINED3DFMT_P8_UINT: return D3DFMT_P8;
|
||||
case WINED3DFMT_L8_UNORM: return D3DFMT_L8;
|
||||
case WINED3DFMT_L8A8_UNORM: return D3DFMT_A8L8;
|
||||
case WINED3DFMT_L4A4_UNORM: return D3DFMT_A4L4;
|
||||
case WINED3DFMT_R8G8_SNORM: return D3DFMT_V8U8;
|
||||
case WINED3DFMT_L6V5U5: return D3DFMT_L6V5U5;
|
||||
case WINED3DFMT_X8L8V8U8: return D3DFMT_X8L8V8U8;
|
||||
case WINED3DFMT_R5G5_SNORM_L6_UNORM: return D3DFMT_L6V5U5;
|
||||
case WINED3DFMT_R8G8_SNORM_L8X8_UNORM: return D3DFMT_X8L8V8U8;
|
||||
case WINED3DFMT_R8G8B8A8_SNORM: return D3DFMT_Q8W8V8U8;
|
||||
case WINED3DFMT_R16G16_SNORM: return D3DFMT_V16U16;
|
||||
case WINED3DFMT_W11V11U10: return D3DFMT_W11V11U10;
|
||||
case WINED3DFMT_A2W10V10U10: return D3DFMT_A2W10V10U10;
|
||||
case WINED3DFMT_R10G11B11_SNORM: return D3DFMT_W11V11U10;
|
||||
case WINED3DFMT_R10G10B10_SNORM_A2_UNORM: return D3DFMT_A2W10V10U10;
|
||||
case WINED3DFMT_D16_LOCKABLE: return D3DFMT_D16_LOCKABLE;
|
||||
case WINED3DFMT_D32: return D3DFMT_D32;
|
||||
case WINED3DFMT_D15S1: return D3DFMT_D15S1;
|
||||
case WINED3DFMT_D24S8: return D3DFMT_D24S8;
|
||||
case WINED3DFMT_D24X8: return D3DFMT_D24X8;
|
||||
case WINED3DFMT_D24X4S4: return D3DFMT_D24X4S4;
|
||||
case WINED3DFMT_D32_UNORM: return D3DFMT_D32;
|
||||
case WINED3DFMT_S1_UINT_D15_UNORM: return D3DFMT_D15S1;
|
||||
case WINED3DFMT_S8_UINT_D24_UNORM: return D3DFMT_D24S8;
|
||||
case WINED3DFMT_X8D24_UNORM: return D3DFMT_D24X8;
|
||||
case WINED3DFMT_S4X4_UINT_D24_UNORM: return D3DFMT_D24X4S4;
|
||||
case WINED3DFMT_D16_UNORM: return D3DFMT_D16;
|
||||
case WINED3DFMT_VERTEXDATA: return D3DFMT_VERTEXDATA;
|
||||
case WINED3DFMT_R16_UINT: return D3DFMT_INDEX16;
|
||||
@ -97,37 +97,37 @@ WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format)
|
||||
switch(format)
|
||||
{
|
||||
case D3DFMT_UNKNOWN: return WINED3DFMT_UNKNOWN;
|
||||
case D3DFMT_R8G8B8: return WINED3DFMT_R8G8B8;
|
||||
case D3DFMT_A8R8G8B8: return WINED3DFMT_A8R8G8B8;
|
||||
case D3DFMT_X8R8G8B8: return WINED3DFMT_X8R8G8B8;
|
||||
case D3DFMT_R5G6B5: return WINED3DFMT_R5G6B5;
|
||||
case D3DFMT_X1R5G5B5: return WINED3DFMT_X1R5G5B5;
|
||||
case D3DFMT_A1R5G5B5: return WINED3DFMT_A1R5G5B5;
|
||||
case D3DFMT_A4R4G4B4: return WINED3DFMT_A4R4G4B4;
|
||||
case D3DFMT_R3G3B2: return WINED3DFMT_R3G3B2;
|
||||
case D3DFMT_R8G8B8: return WINED3DFMT_B8G8R8_UNORM;
|
||||
case D3DFMT_A8R8G8B8: return WINED3DFMT_B8G8R8A8_UNORM;
|
||||
case D3DFMT_X8R8G8B8: return WINED3DFMT_B8G8R8X8_UNORM;
|
||||
case D3DFMT_R5G6B5: return WINED3DFMT_B5G6R5_UNORM;
|
||||
case D3DFMT_X1R5G5B5: return WINED3DFMT_B5G5R5X1_UNORM;
|
||||
case D3DFMT_A1R5G5B5: return WINED3DFMT_B5G5R5A1_UNORM;
|
||||
case D3DFMT_A4R4G4B4: return WINED3DFMT_B4G4R4A4_UNORM;
|
||||
case D3DFMT_R3G3B2: return WINED3DFMT_B2G3R3_UNORM;
|
||||
case D3DFMT_A8: return WINED3DFMT_A8_UNORM;
|
||||
case D3DFMT_A8R3G3B2: return WINED3DFMT_A8R3G3B2;
|
||||
case D3DFMT_X4R4G4B4: return WINED3DFMT_X4R4G4B4;
|
||||
case D3DFMT_A8R3G3B2: return WINED3DFMT_B2G3R3A8_UNORM;
|
||||
case D3DFMT_X4R4G4B4: return WINED3DFMT_B4G4R4X4_UNORM;
|
||||
case D3DFMT_A2B10G10R10: return WINED3DFMT_R10G10B10A2_UNORM;
|
||||
case D3DFMT_G16R16: return WINED3DFMT_R16G16_UNORM;
|
||||
case D3DFMT_A8P8: return WINED3DFMT_A8P8;
|
||||
case D3DFMT_P8: return WINED3DFMT_P8;
|
||||
case D3DFMT_L8: return WINED3DFMT_L8;
|
||||
case D3DFMT_A8L8: return WINED3DFMT_A8L8;
|
||||
case D3DFMT_A4L4: return WINED3DFMT_A4L4;
|
||||
case D3DFMT_A8P8: return WINED3DFMT_P8_UINT_A8_UNORM;
|
||||
case D3DFMT_P8: return WINED3DFMT_P8_UINT;
|
||||
case D3DFMT_L8: return WINED3DFMT_L8_UNORM;
|
||||
case D3DFMT_A8L8: return WINED3DFMT_L8A8_UNORM;
|
||||
case D3DFMT_A4L4: return WINED3DFMT_L4A4_UNORM;
|
||||
case D3DFMT_V8U8: return WINED3DFMT_R8G8_SNORM;
|
||||
case D3DFMT_L6V5U5: return WINED3DFMT_L6V5U5;
|
||||
case D3DFMT_X8L8V8U8: return WINED3DFMT_X8L8V8U8;
|
||||
case D3DFMT_L6V5U5: return WINED3DFMT_R5G5_SNORM_L6_UNORM;
|
||||
case D3DFMT_X8L8V8U8: return WINED3DFMT_R8G8_SNORM_L8X8_UNORM;
|
||||
case D3DFMT_Q8W8V8U8: return WINED3DFMT_R8G8B8A8_SNORM;
|
||||
case D3DFMT_V16U16: return WINED3DFMT_R16G16_SNORM;
|
||||
case D3DFMT_W11V11U10: return WINED3DFMT_W11V11U10;
|
||||
case D3DFMT_A2W10V10U10: return WINED3DFMT_A2W10V10U10;
|
||||
case D3DFMT_W11V11U10: return WINED3DFMT_R10G11B11_SNORM;
|
||||
case D3DFMT_A2W10V10U10: return WINED3DFMT_R10G10B10_SNORM_A2_UNORM;
|
||||
case D3DFMT_D16_LOCKABLE: return WINED3DFMT_D16_LOCKABLE;
|
||||
case D3DFMT_D32: return WINED3DFMT_D32;
|
||||
case D3DFMT_D15S1: return WINED3DFMT_D15S1;
|
||||
case D3DFMT_D24S8: return WINED3DFMT_D24S8;
|
||||
case D3DFMT_D24X8: return WINED3DFMT_D24X8;
|
||||
case D3DFMT_D24X4S4: return WINED3DFMT_D24X4S4;
|
||||
case D3DFMT_D32: return WINED3DFMT_D32_UNORM;
|
||||
case D3DFMT_D15S1: return WINED3DFMT_S1_UINT_D15_UNORM;
|
||||
case D3DFMT_D24S8: return WINED3DFMT_S8_UINT_D24_UNORM;
|
||||
case D3DFMT_D24X8: return WINED3DFMT_X8D24_UNORM;
|
||||
case D3DFMT_D24X4S4: return WINED3DFMT_S4X4_UINT_D24_UNORM;
|
||||
case D3DFMT_D16: return WINED3DFMT_D16_UNORM;
|
||||
case D3DFMT_VERTEXDATA: return WINED3DFMT_VERTEXDATA;
|
||||
case D3DFMT_INDEX16: return WINED3DFMT_R16_UINT;
|
||||
|
@ -260,7 +260,7 @@ static const WINED3DFORMAT wined3d_format_lookup[] =
|
||||
/*WINED3DDECLTYPE_FLOAT2*/ WINED3DFMT_R32G32_FLOAT,
|
||||
/*WINED3DDECLTYPE_FLOAT3*/ WINED3DFMT_R32G32B32_FLOAT,
|
||||
/*WINED3DDECLTYPE_FLOAT4*/ WINED3DFMT_R32G32B32A32_FLOAT,
|
||||
/*WINED3DDECLTYPE_D3DCOLOR*/ WINED3DFMT_A8R8G8B8,
|
||||
/*WINED3DDECLTYPE_D3DCOLOR*/ WINED3DFMT_B8G8R8A8_UNORM,
|
||||
/*WINED3DDECLTYPE_UBYTE4*/ WINED3DFMT_R8G8B8A8_UINT,
|
||||
/*WINED3DDECLTYPE_SHORT2*/ WINED3DFMT_R16G16_SINT,
|
||||
/*WINED3DDECLTYPE_SHORT4*/ WINED3DFMT_R16G16B16A16_SINT,
|
||||
|
@ -35,44 +35,44 @@ D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
|
||||
switch(format)
|
||||
{
|
||||
case WINED3DFMT_UNKNOWN: return D3DFMT_UNKNOWN;
|
||||
case WINED3DFMT_R8G8B8: return D3DFMT_R8G8B8;
|
||||
case WINED3DFMT_A8R8G8B8: return D3DFMT_A8R8G8B8;
|
||||
case WINED3DFMT_X8R8G8B8: return D3DFMT_X8R8G8B8;
|
||||
case WINED3DFMT_R5G6B5: return D3DFMT_R5G6B5;
|
||||
case WINED3DFMT_X1R5G5B5: return D3DFMT_X1R5G5B5;
|
||||
case WINED3DFMT_A1R5G5B5: return D3DFMT_A1R5G5B5;
|
||||
case WINED3DFMT_A4R4G4B4: return D3DFMT_A4R4G4B4;
|
||||
case WINED3DFMT_R3G3B2: return D3DFMT_R3G3B2;
|
||||
case WINED3DFMT_B8G8R8_UNORM: return D3DFMT_R8G8B8;
|
||||
case WINED3DFMT_B8G8R8A8_UNORM: return D3DFMT_A8R8G8B8;
|
||||
case WINED3DFMT_B8G8R8X8_UNORM: return D3DFMT_X8R8G8B8;
|
||||
case WINED3DFMT_B5G6R5_UNORM: return D3DFMT_R5G6B5;
|
||||
case WINED3DFMT_B5G5R5X1_UNORM: return D3DFMT_X1R5G5B5;
|
||||
case WINED3DFMT_B5G5R5A1_UNORM: return D3DFMT_A1R5G5B5;
|
||||
case WINED3DFMT_B4G4R4A4_UNORM: return D3DFMT_A4R4G4B4;
|
||||
case WINED3DFMT_B2G3R3_UNORM: return D3DFMT_R3G3B2;
|
||||
case WINED3DFMT_A8_UNORM: return D3DFMT_A8;
|
||||
case WINED3DFMT_A8R3G3B2: return D3DFMT_A8R3G3B2;
|
||||
case WINED3DFMT_X4R4G4B4: return D3DFMT_X4R4G4B4;
|
||||
case WINED3DFMT_B2G3R3A8_UNORM: return D3DFMT_A8R3G3B2;
|
||||
case WINED3DFMT_B4G4R4X4_UNORM: return D3DFMT_X4R4G4B4;
|
||||
case WINED3DFMT_R10G10B10A2_UNORM: return D3DFMT_A2B10G10R10;
|
||||
case WINED3DFMT_R8G8B8A8_UNORM: return D3DFMT_A8B8G8R8;
|
||||
case WINED3DFMT_X8B8G8R8: return D3DFMT_X8B8G8R8;
|
||||
case WINED3DFMT_R8G8B8X8_UNORM: return D3DFMT_X8B8G8R8;
|
||||
case WINED3DFMT_R16G16_UNORM: return D3DFMT_G16R16;
|
||||
case WINED3DFMT_A2R10G10B10: return D3DFMT_A2R10G10B10;
|
||||
case WINED3DFMT_B10G10R10A2_UNORM: return D3DFMT_A2R10G10B10;
|
||||
case WINED3DFMT_R16G16B16A16_UNORM: return D3DFMT_A16B16G16R16;
|
||||
case WINED3DFMT_A8P8: return D3DFMT_A8P8;
|
||||
case WINED3DFMT_P8: return D3DFMT_P8;
|
||||
case WINED3DFMT_L8: return D3DFMT_L8;
|
||||
case WINED3DFMT_A8L8: return D3DFMT_A8L8;
|
||||
case WINED3DFMT_A4L4: return D3DFMT_A4L4;
|
||||
case WINED3DFMT_P8_UINT_A8_UNORM: return D3DFMT_A8P8;
|
||||
case WINED3DFMT_P8_UINT: return D3DFMT_P8;
|
||||
case WINED3DFMT_L8_UNORM: return D3DFMT_L8;
|
||||
case WINED3DFMT_L8A8_UNORM: return D3DFMT_A8L8;
|
||||
case WINED3DFMT_L4A4_UNORM: return D3DFMT_A4L4;
|
||||
case WINED3DFMT_R8G8_SNORM: return D3DFMT_V8U8;
|
||||
case WINED3DFMT_L6V5U5: return D3DFMT_L6V5U5;
|
||||
case WINED3DFMT_X8L8V8U8: return D3DFMT_X8L8V8U8;
|
||||
case WINED3DFMT_R5G5_SNORM_L6_UNORM: return D3DFMT_L6V5U5;
|
||||
case WINED3DFMT_R8G8_SNORM_L8X8_UNORM: return D3DFMT_X8L8V8U8;
|
||||
case WINED3DFMT_R8G8B8A8_SNORM: return D3DFMT_Q8W8V8U8;
|
||||
case WINED3DFMT_R16G16_SNORM: return D3DFMT_V16U16;
|
||||
case WINED3DFMT_A2W10V10U10: return D3DFMT_A2W10V10U10;
|
||||
case WINED3DFMT_R10G10B10_SNORM_A2_UNORM: return D3DFMT_A2W10V10U10;
|
||||
case WINED3DFMT_D16_LOCKABLE: return D3DFMT_D16_LOCKABLE;
|
||||
case WINED3DFMT_D32: return D3DFMT_D32;
|
||||
case WINED3DFMT_D15S1: return D3DFMT_D15S1;
|
||||
case WINED3DFMT_D24S8: return D3DFMT_D24S8;
|
||||
case WINED3DFMT_D24X8: return D3DFMT_D24X8;
|
||||
case WINED3DFMT_D24X4S4: return D3DFMT_D24X4S4;
|
||||
case WINED3DFMT_D32_UNORM: return D3DFMT_D32;
|
||||
case WINED3DFMT_S1_UINT_D15_UNORM: return D3DFMT_D15S1;
|
||||
case WINED3DFMT_S8_UINT_D24_UNORM: return D3DFMT_D24S8;
|
||||
case WINED3DFMT_X8D24_UNORM: return D3DFMT_D24X8;
|
||||
case WINED3DFMT_S4X4_UINT_D24_UNORM: return D3DFMT_D24X4S4;
|
||||
case WINED3DFMT_D16_UNORM: return D3DFMT_D16;
|
||||
case WINED3DFMT_L16: return D3DFMT_L16;
|
||||
case WINED3DFMT_D32F_LOCKABLE: return D3DFMT_D32F_LOCKABLE;
|
||||
case WINED3DFMT_D24FS8: return D3DFMT_D24FS8;
|
||||
case WINED3DFMT_L16_UNORM: return D3DFMT_L16;
|
||||
case WINED3DFMT_D32_FLOAT: return D3DFMT_D32F_LOCKABLE;
|
||||
case WINED3DFMT_S8_UINT_D24_FLOAT: return D3DFMT_D24FS8;
|
||||
case WINED3DFMT_VERTEXDATA: return D3DFMT_VERTEXDATA;
|
||||
case WINED3DFMT_R16_UINT: return D3DFMT_INDEX16;
|
||||
case WINED3DFMT_R32_UINT: return D3DFMT_INDEX32;
|
||||
@ -83,7 +83,7 @@ D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
|
||||
case WINED3DFMT_R32_FLOAT: return D3DFMT_R32F;
|
||||
case WINED3DFMT_R32G32_FLOAT: return D3DFMT_G32R32F;
|
||||
case WINED3DFMT_R32G32B32A32_FLOAT: return D3DFMT_A32B32G32R32F;
|
||||
case WINED3DFMT_CxV8U8: return D3DFMT_CxV8U8;
|
||||
case WINED3DFMT_R8G8_SNORM_Cx: return D3DFMT_CxV8U8;
|
||||
default:
|
||||
FIXME("Unhandled WINED3DFORMAT %#x\n", format);
|
||||
return D3DFMT_UNKNOWN;
|
||||
@ -100,44 +100,44 @@ WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format)
|
||||
switch(format)
|
||||
{
|
||||
case D3DFMT_UNKNOWN: return WINED3DFMT_UNKNOWN;
|
||||
case D3DFMT_R8G8B8: return WINED3DFMT_R8G8B8;
|
||||
case D3DFMT_A8R8G8B8: return WINED3DFMT_A8R8G8B8;
|
||||
case D3DFMT_X8R8G8B8: return WINED3DFMT_X8R8G8B8;
|
||||
case D3DFMT_R5G6B5: return WINED3DFMT_R5G6B5;
|
||||
case D3DFMT_X1R5G5B5: return WINED3DFMT_X1R5G5B5;
|
||||
case D3DFMT_A1R5G5B5: return WINED3DFMT_A1R5G5B5;
|
||||
case D3DFMT_A4R4G4B4: return WINED3DFMT_A4R4G4B4;
|
||||
case D3DFMT_R3G3B2: return WINED3DFMT_R3G3B2;
|
||||
case D3DFMT_R8G8B8: return WINED3DFMT_B8G8R8_UNORM;
|
||||
case D3DFMT_A8R8G8B8: return WINED3DFMT_B8G8R8A8_UNORM;
|
||||
case D3DFMT_X8R8G8B8: return WINED3DFMT_B8G8R8X8_UNORM;
|
||||
case D3DFMT_R5G6B5: return WINED3DFMT_B5G6R5_UNORM;
|
||||
case D3DFMT_X1R5G5B5: return WINED3DFMT_B5G5R5X1_UNORM;
|
||||
case D3DFMT_A1R5G5B5: return WINED3DFMT_B5G5R5A1_UNORM;
|
||||
case D3DFMT_A4R4G4B4: return WINED3DFMT_B4G4R4A4_UNORM;
|
||||
case D3DFMT_R3G3B2: return WINED3DFMT_B2G3R3_UNORM;
|
||||
case D3DFMT_A8: return WINED3DFMT_A8_UNORM;
|
||||
case D3DFMT_A8R3G3B2: return WINED3DFMT_A8R3G3B2;
|
||||
case D3DFMT_X4R4G4B4: return WINED3DFMT_X4R4G4B4;
|
||||
case D3DFMT_A8R3G3B2: return WINED3DFMT_B2G3R3A8_UNORM;
|
||||
case D3DFMT_X4R4G4B4: return WINED3DFMT_B4G4R4X4_UNORM;
|
||||
case D3DFMT_A2B10G10R10: return WINED3DFMT_R10G10B10A2_UNORM;
|
||||
case D3DFMT_A8B8G8R8: return WINED3DFMT_R8G8B8A8_UNORM;
|
||||
case D3DFMT_X8B8G8R8: return WINED3DFMT_X8B8G8R8;
|
||||
case D3DFMT_X8B8G8R8: return WINED3DFMT_R8G8B8X8_UNORM;
|
||||
case D3DFMT_G16R16: return WINED3DFMT_R16G16_UNORM;
|
||||
case D3DFMT_A2R10G10B10: return WINED3DFMT_A2R10G10B10;
|
||||
case D3DFMT_A2R10G10B10: return WINED3DFMT_B10G10R10A2_UNORM;
|
||||
case D3DFMT_A16B16G16R16: return WINED3DFMT_R16G16B16A16_UNORM;
|
||||
case D3DFMT_A8P8: return WINED3DFMT_A8P8;
|
||||
case D3DFMT_P8: return WINED3DFMT_P8;
|
||||
case D3DFMT_L8: return WINED3DFMT_L8;
|
||||
case D3DFMT_A8L8: return WINED3DFMT_A8L8;
|
||||
case D3DFMT_A4L4: return WINED3DFMT_A4L4;
|
||||
case D3DFMT_A8P8: return WINED3DFMT_P8_UINT_A8_UNORM;
|
||||
case D3DFMT_P8: return WINED3DFMT_P8_UINT;
|
||||
case D3DFMT_L8: return WINED3DFMT_L8_UNORM;
|
||||
case D3DFMT_A8L8: return WINED3DFMT_L8A8_UNORM;
|
||||
case D3DFMT_A4L4: return WINED3DFMT_L4A4_UNORM;
|
||||
case D3DFMT_V8U8: return WINED3DFMT_R8G8_SNORM;
|
||||
case D3DFMT_L6V5U5: return WINED3DFMT_L6V5U5;
|
||||
case D3DFMT_X8L8V8U8: return WINED3DFMT_X8L8V8U8;
|
||||
case D3DFMT_L6V5U5: return WINED3DFMT_R5G5_SNORM_L6_UNORM;
|
||||
case D3DFMT_X8L8V8U8: return WINED3DFMT_R8G8_SNORM_L8X8_UNORM;
|
||||
case D3DFMT_Q8W8V8U8: return WINED3DFMT_R8G8B8A8_SNORM;
|
||||
case D3DFMT_V16U16: return WINED3DFMT_R16G16_SNORM;
|
||||
case D3DFMT_A2W10V10U10: return WINED3DFMT_A2W10V10U10;
|
||||
case D3DFMT_A2W10V10U10: return WINED3DFMT_R10G10B10_SNORM_A2_UNORM;
|
||||
case D3DFMT_D16_LOCKABLE: return WINED3DFMT_D16_LOCKABLE;
|
||||
case D3DFMT_D32: return WINED3DFMT_D32;
|
||||
case D3DFMT_D15S1: return WINED3DFMT_D15S1;
|
||||
case D3DFMT_D24S8: return WINED3DFMT_D24S8;
|
||||
case D3DFMT_D24X8: return WINED3DFMT_D24X8;
|
||||
case D3DFMT_D24X4S4: return WINED3DFMT_D24X4S4;
|
||||
case D3DFMT_D32: return WINED3DFMT_D32_UNORM;
|
||||
case D3DFMT_D15S1: return WINED3DFMT_S1_UINT_D15_UNORM;
|
||||
case D3DFMT_D24S8: return WINED3DFMT_S8_UINT_D24_UNORM;
|
||||
case D3DFMT_D24X8: return WINED3DFMT_X8D24_UNORM;
|
||||
case D3DFMT_D24X4S4: return WINED3DFMT_S4X4_UINT_D24_UNORM;
|
||||
case D3DFMT_D16: return WINED3DFMT_D16_UNORM;
|
||||
case D3DFMT_L16: return WINED3DFMT_L16;
|
||||
case D3DFMT_D32F_LOCKABLE: return WINED3DFMT_D32F_LOCKABLE;
|
||||
case D3DFMT_D24FS8: return WINED3DFMT_D24FS8;
|
||||
case D3DFMT_L16: return WINED3DFMT_L16_UNORM;
|
||||
case D3DFMT_D32F_LOCKABLE: return WINED3DFMT_D32_FLOAT;
|
||||
case D3DFMT_D24FS8: return WINED3DFMT_S8_UINT_D24_FLOAT;
|
||||
case D3DFMT_VERTEXDATA: return WINED3DFMT_VERTEXDATA;
|
||||
case D3DFMT_INDEX16: return WINED3DFMT_R16_UINT;
|
||||
case D3DFMT_INDEX32: return WINED3DFMT_R32_UINT;
|
||||
@ -148,7 +148,7 @@ WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format)
|
||||
case D3DFMT_R32F: return WINED3DFMT_R32_FLOAT;
|
||||
case D3DFMT_G32R32F: return WINED3DFMT_R32G32_FLOAT;
|
||||
case D3DFMT_A32B32G32R32F: return WINED3DFMT_R32G32B32A32_FLOAT;
|
||||
case D3DFMT_CxV8U8: return WINED3DFMT_CxV8U8;
|
||||
case D3DFMT_CxV8U8: return WINED3DFMT_R8G8_SNORM_Cx;
|
||||
default:
|
||||
FIXME("Unhandled D3DFORMAT %#x\n", format);
|
||||
return WINED3DFMT_UNKNOWN;
|
||||
|
@ -36,7 +36,7 @@ static D3DDECLTYPE_INFO const d3d_dtype_lookup[D3DDECLTYPE_UNUSED] = {
|
||||
{D3DDECLTYPE_FLOAT2, WINED3DFMT_R32G32_FLOAT, 2, sizeof(float)},
|
||||
{D3DDECLTYPE_FLOAT3, WINED3DFMT_R32G32B32_FLOAT, 3, sizeof(float)},
|
||||
{D3DDECLTYPE_FLOAT4, WINED3DFMT_R32G32B32A32_FLOAT, 4, sizeof(float)},
|
||||
{D3DDECLTYPE_D3DCOLOR, WINED3DFMT_A8R8G8B8, 4, sizeof(BYTE)},
|
||||
{D3DDECLTYPE_D3DCOLOR, WINED3DFMT_B8G8R8A8_UNORM, 4, sizeof(BYTE)},
|
||||
{D3DDECLTYPE_UBYTE4, WINED3DFMT_R8G8B8A8_UINT, 4, sizeof(BYTE)},
|
||||
{D3DDECLTYPE_SHORT2, WINED3DFMT_R16G16_SINT, 2, sizeof(short int)},
|
||||
{D3DDECLTYPE_SHORT4, WINED3DFMT_R16G16B16A16_SINT, 4, sizeof(short int)},
|
||||
|
@ -581,11 +581,11 @@ IDirectDrawImpl_SetDisplayModeNoOverride(IDirectDraw7 *iface,
|
||||
Mode.RefreshRate = RefreshRate;
|
||||
switch(BPP)
|
||||
{
|
||||
case 8: Mode.Format = WINED3DFMT_P8; break;
|
||||
case 15: Mode.Format = WINED3DFMT_X1R5G5B5; break;
|
||||
case 16: Mode.Format = WINED3DFMT_R5G6B5; break;
|
||||
case 24: Mode.Format = WINED3DFMT_R8G8B8; break;
|
||||
case 32: Mode.Format = WINED3DFMT_X8R8G8B8; break;
|
||||
case 8: Mode.Format = WINED3DFMT_P8_UINT; break;
|
||||
case 15: Mode.Format = WINED3DFMT_B5G5R5X1_UNORM; break;
|
||||
case 16: Mode.Format = WINED3DFMT_B5G6R5_UNORM; break;
|
||||
case 24: Mode.Format = WINED3DFMT_B8G8R8_UNORM; break;
|
||||
case 32: Mode.Format = WINED3DFMT_B8G8R8X8_UNORM; break;
|
||||
}
|
||||
|
||||
/* TODO: The possible return values from msdn suggest that
|
||||
@ -1336,22 +1336,22 @@ IDirectDrawImpl_EnumDisplayModes(IDirectDraw7 *iface,
|
||||
|
||||
WINED3DFORMAT checkFormatList[] =
|
||||
{
|
||||
WINED3DFMT_R8G8B8,
|
||||
WINED3DFMT_A8R8G8B8,
|
||||
WINED3DFMT_X8R8G8B8,
|
||||
WINED3DFMT_R5G6B5,
|
||||
WINED3DFMT_X1R5G5B5,
|
||||
WINED3DFMT_A1R5G5B5,
|
||||
WINED3DFMT_A4R4G4B4,
|
||||
WINED3DFMT_R3G3B2,
|
||||
WINED3DFMT_A8R3G3B2,
|
||||
WINED3DFMT_X4R4G4B4,
|
||||
WINED3DFMT_B8G8R8_UNORM,
|
||||
WINED3DFMT_B8G8R8A8_UNORM,
|
||||
WINED3DFMT_B8G8R8X8_UNORM,
|
||||
WINED3DFMT_B5G6R5_UNORM,
|
||||
WINED3DFMT_B5G5R5X1_UNORM,
|
||||
WINED3DFMT_B5G5R5A1_UNORM,
|
||||
WINED3DFMT_B4G4R4A4_UNORM,
|
||||
WINED3DFMT_B2G3R3_UNORM,
|
||||
WINED3DFMT_B2G3R3A8_UNORM,
|
||||
WINED3DFMT_B4G4R4X4_UNORM,
|
||||
WINED3DFMT_R10G10B10A2_UNORM,
|
||||
WINED3DFMT_R8G8B8A8_UNORM,
|
||||
WINED3DFMT_X8B8G8R8,
|
||||
WINED3DFMT_A2R10G10B10,
|
||||
WINED3DFMT_A8P8,
|
||||
WINED3DFMT_P8
|
||||
WINED3DFMT_R8G8B8X8_UNORM,
|
||||
WINED3DFMT_B10G10R10A2_UNORM,
|
||||
WINED3DFMT_P8_UINT_A8_UNORM,
|
||||
WINED3DFMT_P8_UINT,
|
||||
};
|
||||
|
||||
TRACE("(%p)->(%p,%p,%p): Relay\n", This, DDSD, Context, cb);
|
||||
@ -2341,23 +2341,23 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
|
||||
switch(This->orig_bpp)
|
||||
{
|
||||
case 8:
|
||||
Mode.Format = WINED3DFMT_P8;
|
||||
Mode.Format = WINED3DFMT_P8_UINT;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
Mode.Format = WINED3DFMT_X1R5G5B5;
|
||||
Mode.Format = WINED3DFMT_B5G5R5X1_UNORM;
|
||||
break;
|
||||
|
||||
case 16:
|
||||
Mode.Format = WINED3DFMT_R5G6B5;
|
||||
Mode.Format = WINED3DFMT_B5G6R5_UNORM;
|
||||
break;
|
||||
|
||||
case 24:
|
||||
Mode.Format = WINED3DFMT_R8G8B8;
|
||||
Mode.Format = WINED3DFMT_B8G8R8_UNORM;
|
||||
break;
|
||||
|
||||
case 32:
|
||||
Mode.Format = WINED3DFMT_X8R8G8B8;
|
||||
Mode.Format = WINED3DFMT_B8G8R8X8_UNORM;
|
||||
break;
|
||||
}
|
||||
Mode.Width = This->orig_width;
|
||||
@ -2376,16 +2376,16 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
|
||||
switch(desc2.u2.dwMipMapCount) /* Who had this glorious idea? */
|
||||
{
|
||||
case 15:
|
||||
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, WINED3DFMT_D15S1);
|
||||
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, WINED3DFMT_S1_UINT_D15_UNORM);
|
||||
break;
|
||||
case 16:
|
||||
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, WINED3DFMT_D16_UNORM);
|
||||
break;
|
||||
case 24:
|
||||
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, WINED3DFMT_D24X8);
|
||||
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, WINED3DFMT_X8D24_UNORM);
|
||||
break;
|
||||
case 32:
|
||||
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, WINED3DFMT_D32);
|
||||
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, WINED3DFMT_D32_UNORM);
|
||||
break;
|
||||
default:
|
||||
ERR("Unknown Z buffer bit depth\n");
|
||||
|
@ -1147,18 +1147,18 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
|
||||
|
||||
WINED3DFORMAT FormatList[] = {
|
||||
/* 32 bit */
|
||||
WINED3DFMT_A8R8G8B8,
|
||||
WINED3DFMT_X8R8G8B8,
|
||||
WINED3DFMT_B8G8R8A8_UNORM,
|
||||
WINED3DFMT_B8G8R8X8_UNORM,
|
||||
/* 24 bit */
|
||||
WINED3DFMT_R8G8B8,
|
||||
WINED3DFMT_B8G8R8_UNORM,
|
||||
/* 16 Bit */
|
||||
WINED3DFMT_A1R5G5B5,
|
||||
WINED3DFMT_A4R4G4B4,
|
||||
WINED3DFMT_R5G6B5,
|
||||
WINED3DFMT_X1R5G5B5,
|
||||
WINED3DFMT_B5G5R5A1_UNORM,
|
||||
WINED3DFMT_B4G4R4A4_UNORM,
|
||||
WINED3DFMT_B5G6R5_UNORM,
|
||||
WINED3DFMT_B5G5R5X1_UNORM,
|
||||
/* 8 Bit */
|
||||
WINED3DFMT_R3G3B2,
|
||||
WINED3DFMT_P8,
|
||||
WINED3DFMT_B2G3R3_UNORM,
|
||||
WINED3DFMT_P8_UINT,
|
||||
/* FOURCC codes */
|
||||
WINED3DFMT_DXT1,
|
||||
WINED3DFMT_DXT3,
|
||||
@ -1167,12 +1167,12 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
|
||||
|
||||
WINED3DFORMAT BumpFormatList[] = {
|
||||
WINED3DFMT_R8G8_SNORM,
|
||||
WINED3DFMT_L6V5U5,
|
||||
WINED3DFMT_X8L8V8U8,
|
||||
WINED3DFMT_R5G5_SNORM_L6_UNORM,
|
||||
WINED3DFMT_R8G8_SNORM_L8X8_UNORM,
|
||||
WINED3DFMT_R8G8B8A8_SNORM,
|
||||
WINED3DFMT_R16G16_SNORM,
|
||||
WINED3DFMT_W11V11U10,
|
||||
WINED3DFMT_A2W10V10U10
|
||||
WINED3DFMT_R10G11B11_SNORM,
|
||||
WINED3DFMT_R10G10B10_SNORM_A2_UNORM
|
||||
};
|
||||
|
||||
TRACE("(%p)->(%p,%p): Relay\n", This, Callback, Arg);
|
||||
@ -1309,18 +1309,18 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
|
||||
|
||||
WINED3DFORMAT FormatList[] = {
|
||||
/* 32 bit */
|
||||
WINED3DFMT_A8R8G8B8,
|
||||
WINED3DFMT_X8R8G8B8,
|
||||
WINED3DFMT_B8G8R8A8_UNORM,
|
||||
WINED3DFMT_B8G8R8X8_UNORM,
|
||||
/* 24 bit */
|
||||
WINED3DFMT_R8G8B8,
|
||||
WINED3DFMT_B8G8R8_UNORM,
|
||||
/* 16 Bit */
|
||||
WINED3DFMT_A1R5G5B5,
|
||||
WINED3DFMT_A4R4G4B4,
|
||||
WINED3DFMT_R5G6B5,
|
||||
WINED3DFMT_X1R5G5B5,
|
||||
WINED3DFMT_B5G5R5A1_UNORM,
|
||||
WINED3DFMT_B4G4R4A4_UNORM,
|
||||
WINED3DFMT_B5G6R5_UNORM,
|
||||
WINED3DFMT_B5G5R5X1_UNORM,
|
||||
/* 8 Bit */
|
||||
WINED3DFMT_R3G3B2,
|
||||
WINED3DFMT_P8,
|
||||
WINED3DFMT_B2G3R3_UNORM,
|
||||
WINED3DFMT_P8_UINT,
|
||||
/* FOURCC codes - Not in this version*/
|
||||
};
|
||||
|
||||
@ -3841,14 +3841,14 @@ IDirect3DDeviceImpl_7_DrawPrimitiveStrided(IDirect3DDevice7 *iface,
|
||||
|
||||
if(VertexType & D3DFVF_DIFFUSE)
|
||||
{
|
||||
WineD3DStrided.diffuse.format = WINED3DFMT_A8R8G8B8;
|
||||
WineD3DStrided.diffuse.format = WINED3DFMT_B8G8R8A8_UNORM;
|
||||
WineD3DStrided.diffuse.lpData = D3DDrawPrimStrideData->diffuse.lpvData;
|
||||
WineD3DStrided.diffuse.dwStride = D3DDrawPrimStrideData->diffuse.dwStride;
|
||||
}
|
||||
|
||||
if(VertexType & D3DFVF_SPECULAR)
|
||||
{
|
||||
WineD3DStrided.specular.format = WINED3DFMT_A8R8G8B8;
|
||||
WineD3DStrided.specular.format = WINED3DFMT_B8G8R8A8_UNORM;
|
||||
WineD3DStrided.specular.lpData = D3DDrawPrimStrideData->specular.lpvData;
|
||||
WineD3DStrided.specular.dwStride = D3DDrawPrimStrideData->specular.dwStride;
|
||||
}
|
||||
@ -3982,14 +3982,14 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided(IDirect3DDevice7 *iface,
|
||||
|
||||
if(VertexType & D3DFVF_DIFFUSE)
|
||||
{
|
||||
WineD3DStrided.diffuse.format = WINED3DFMT_A8R8G8B8;
|
||||
WineD3DStrided.diffuse.format = WINED3DFMT_B8G8R8A8_UNORM;
|
||||
WineD3DStrided.diffuse.lpData = D3DDrawPrimStrideData->diffuse.lpvData;
|
||||
WineD3DStrided.diffuse.dwStride = D3DDrawPrimStrideData->diffuse.dwStride;
|
||||
}
|
||||
|
||||
if(VertexType & D3DFVF_SPECULAR)
|
||||
{
|
||||
WineD3DStrided.specular.format = WINED3DFMT_A8R8G8B8;
|
||||
WineD3DStrided.specular.format = WINED3DFMT_B8G8R8A8_UNORM;
|
||||
WineD3DStrided.specular.lpData = D3DDrawPrimStrideData->specular.lpvData;
|
||||
WineD3DStrided.specular.dwStride = D3DDrawPrimStrideData->specular.dwStride;
|
||||
}
|
||||
|
@ -1112,12 +1112,12 @@ IDirect3DImpl_7_EnumZBufferFormats(IDirect3D7 *iface,
|
||||
/* Order matters. Specifically, BattleZone II (full version) expects the
|
||||
* 16-bit depth formats to be listed before the 24 and 32 ones. */
|
||||
WINED3DFORMAT FormatList[] = {
|
||||
WINED3DFMT_D15S1,
|
||||
WINED3DFMT_S1_UINT_D15_UNORM,
|
||||
WINED3DFMT_D16_UNORM,
|
||||
WINED3DFMT_D24X8,
|
||||
WINED3DFMT_D24X4S4,
|
||||
WINED3DFMT_D24S8,
|
||||
WINED3DFMT_D32
|
||||
WINED3DFMT_X8D24_UNORM,
|
||||
WINED3DFMT_S4X4_UINT_D24_UNORM,
|
||||
WINED3DFMT_S8_UINT_D24_UNORM,
|
||||
WINED3DFMT_D32_UNORM,
|
||||
};
|
||||
|
||||
TRACE("(%p)->(%s,%p,%p): Relay\n", iface, debugstr_guid(refiidDevice), Callback, Context);
|
||||
|
@ -55,7 +55,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->dwSize = Size;
|
||||
switch(WineD3DFormat)
|
||||
{
|
||||
case WINED3DFMT_R8G8B8:
|
||||
case WINED3DFMT_B8G8R8_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_RGB;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 24;
|
||||
@ -65,7 +65,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0x0;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_A8R8G8B8:
|
||||
case WINED3DFMT_B8G8R8A8_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 32;
|
||||
@ -75,7 +75,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0xff000000;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_X8R8G8B8:
|
||||
case WINED3DFMT_B8G8R8X8_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_RGB;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 32;
|
||||
@ -85,7 +85,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0x0;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_X8B8G8R8:
|
||||
case WINED3DFMT_R8G8B8X8_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_RGB;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 32;
|
||||
@ -95,7 +95,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0x0;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_R5G6B5:
|
||||
case WINED3DFMT_B5G6R5_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_RGB;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 16;
|
||||
@ -105,7 +105,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0x0;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_X1R5G5B5:
|
||||
case WINED3DFMT_B5G5R5X1_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_RGB;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 16;
|
||||
@ -115,7 +115,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0x0;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_A1R5G5B5:
|
||||
case WINED3DFMT_B5G5R5A1_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 16;
|
||||
@ -125,7 +125,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0x8000;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_A4R4G4B4:
|
||||
case WINED3DFMT_B4G4R4A4_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 16;
|
||||
@ -135,7 +135,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0xF000;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_R3G3B2:
|
||||
case WINED3DFMT_B2G3R3_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_RGB;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 8;
|
||||
@ -145,7 +145,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwLuminanceAlphaBitMask = 0x0;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_P8:
|
||||
case WINED3DFMT_P8_UINT:
|
||||
DDPixelFormat->dwFlags = DDPF_PALETTEINDEXED8 | DDPF_RGB;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 8;
|
||||
@ -164,7 +164,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwLuminanceAlphaBitMask = 0x0;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_A8R3G3B2:
|
||||
case WINED3DFMT_B2G3R3A8_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_RGB | DDPF_ALPHAPIXELS;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 16;
|
||||
@ -174,7 +174,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0xF000;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_X4R4G4B4:
|
||||
case WINED3DFMT_B4G4R4X4_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_RGB;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwRGBBitCount = 16;
|
||||
@ -196,7 +196,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBZBitMask = 0x00000000;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_D32:
|
||||
case WINED3DFMT_D32_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_ZBUFFER;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwZBufferBitDepth = 32;
|
||||
@ -206,7 +206,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBZBitMask = 0x00000000;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_D24X4S4:
|
||||
case WINED3DFMT_S4X4_UINT_D24_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_ZBUFFER | DDPF_STENCILBUFFER;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
/* Should I set dwZBufferBitDepth to 32 here? */
|
||||
@ -217,7 +217,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0x0;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_D24S8:
|
||||
case WINED3DFMT_S8_UINT_D24_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_ZBUFFER | DDPF_STENCILBUFFER;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
/* Should I set dwZBufferBitDepth to 32 here? */
|
||||
@ -228,7 +228,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0x0;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_D24X8:
|
||||
case WINED3DFMT_X8D24_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_ZBUFFER;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwZBufferBitDepth = 32;
|
||||
@ -238,7 +238,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwRGBAlphaBitMask = 0x0;
|
||||
|
||||
break;
|
||||
case WINED3DFMT_D15S1:
|
||||
case WINED3DFMT_S1_UINT_D15_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_ZBUFFER | DDPF_STENCILBUFFER;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwZBufferBitDepth = 16;
|
||||
@ -274,7 +274,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
break;
|
||||
|
||||
/* Luminance */
|
||||
case WINED3DFMT_L8:
|
||||
case WINED3DFMT_L8_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_LUMINANCE;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwLuminanceBitCount = 8;
|
||||
@ -284,7 +284,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwLuminanceAlphaBitMask = 0x0;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_A4L4:
|
||||
case WINED3DFMT_L4A4_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_ALPHAPIXELS | DDPF_LUMINANCE;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwLuminanceBitCount = 4;
|
||||
@ -294,7 +294,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwLuminanceAlphaBitMask = 0xf0;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_A8L8:
|
||||
case WINED3DFMT_L8A8_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_ALPHAPIXELS | DDPF_LUMINANCE;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwLuminanceBitCount = 16;
|
||||
@ -315,7 +315,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwLuminanceAlphaBitMask = 0x00000000;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_L6V5U5:
|
||||
case WINED3DFMT_R5G5_SNORM_L6_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_BUMPDUDV;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwBumpBitCount = 16;
|
||||
@ -325,7 +325,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u5.dwLuminanceAlphaBitMask = 0x00000000;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_X8L8V8U8:
|
||||
case WINED3DFMT_R8G8_SNORM_L8X8_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_BUMPDUDV;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwBumpBitCount = 32;
|
||||
@ -367,12 +367,12 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
|
||||
if(DDPixelFormat->dwFlags & DDPF_PALETTEINDEXED8)
|
||||
{
|
||||
return WINED3DFMT_P8;
|
||||
return WINED3DFMT_P8_UINT;
|
||||
}
|
||||
else if(DDPixelFormat->dwFlags & (DDPF_PALETTEINDEXED1 | DDPF_PALETTEINDEXED2 | DDPF_PALETTEINDEXED4) )
|
||||
{
|
||||
FIXME("DDPF_PALETTEINDEXED1 to DDPF_PALETTEINDEXED4 are not supported by WineD3D (yet). Returning WINED3DFMT_P8\n");
|
||||
return WINED3DFMT_P8;
|
||||
return WINED3DFMT_P8_UINT;
|
||||
}
|
||||
else if(DDPixelFormat->dwFlags & DDPF_RGB)
|
||||
{
|
||||
@ -380,7 +380,7 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
{
|
||||
case 8:
|
||||
/* This is the only format that can match here */
|
||||
return WINED3DFMT_R3G3B2;
|
||||
return WINED3DFMT_B2G3R3_UNORM;
|
||||
|
||||
case 16:
|
||||
/* Read the Color masks */
|
||||
@ -388,7 +388,7 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
(DDPixelFormat->u3.dwGBitMask == 0x07E0) &&
|
||||
(DDPixelFormat->u4.dwBBitMask == 0x001F) )
|
||||
{
|
||||
return WINED3DFMT_R5G6B5;
|
||||
return WINED3DFMT_B5G6R5_UNORM;
|
||||
}
|
||||
|
||||
if( (DDPixelFormat->u2.dwRBitMask == 0x7C00) &&
|
||||
@ -397,9 +397,9 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
{
|
||||
if( (DDPixelFormat->dwFlags & DDPF_ALPHAPIXELS) &&
|
||||
(DDPixelFormat->u5.dwRGBAlphaBitMask == 0x8000))
|
||||
return WINED3DFMT_A1R5G5B5;
|
||||
return WINED3DFMT_B5G5R5A1_UNORM;
|
||||
else
|
||||
return WINED3DFMT_X1R5G5B5;
|
||||
return WINED3DFMT_B5G5R5X1_UNORM;
|
||||
}
|
||||
|
||||
if( (DDPixelFormat->u2.dwRBitMask == 0x0F00) &&
|
||||
@ -408,9 +408,9 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
{
|
||||
if( (DDPixelFormat->dwFlags & DDPF_ALPHAPIXELS) &&
|
||||
(DDPixelFormat->u5.dwRGBAlphaBitMask == 0xF000))
|
||||
return WINED3DFMT_A4R4G4B4;
|
||||
return WINED3DFMT_B4G4R4A4_UNORM;
|
||||
else
|
||||
return WINED3DFMT_X4R4G4B4;
|
||||
return WINED3DFMT_B4G4R4X4_UNORM;
|
||||
}
|
||||
|
||||
if( (DDPixelFormat->dwFlags & DDPF_ALPHAPIXELS) &&
|
||||
@ -419,13 +419,13 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
(DDPixelFormat->u3.dwGBitMask == 0x001C) &&
|
||||
(DDPixelFormat->u4.dwBBitMask == 0x0003) )
|
||||
{
|
||||
return WINED3DFMT_A8R3G3B2;
|
||||
return WINED3DFMT_B2G3R3A8_UNORM;
|
||||
}
|
||||
ERR("16 bit RGB Pixel format does not match\n");
|
||||
return WINED3DFMT_UNKNOWN;
|
||||
|
||||
case 24:
|
||||
return WINED3DFMT_R8G8B8;
|
||||
return WINED3DFMT_B8G8R8_UNORM;
|
||||
|
||||
case 32:
|
||||
/* Read the Color masks */
|
||||
@ -435,9 +435,9 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
{
|
||||
if( (DDPixelFormat->dwFlags & DDPF_ALPHAPIXELS) &&
|
||||
(DDPixelFormat->u5.dwRGBAlphaBitMask == 0xFF000000))
|
||||
return WINED3DFMT_A8R8G8B8;
|
||||
return WINED3DFMT_B8G8R8A8_UNORM;
|
||||
else
|
||||
return WINED3DFMT_X8R8G8B8;
|
||||
return WINED3DFMT_B8G8R8X8_UNORM;
|
||||
|
||||
}
|
||||
ERR("32 bit RGB pixel format does not match\n");
|
||||
@ -474,17 +474,17 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
{
|
||||
case 4:
|
||||
if(DDPixelFormat->u1.dwAlphaBitDepth == 4)
|
||||
return WINED3DFMT_A4L4;
|
||||
return WINED3DFMT_L4A4_UNORM;
|
||||
ERR("Unknown Alpha / Luminance bit depth combination\n");
|
||||
return WINED3DFMT_UNKNOWN;
|
||||
|
||||
case 6:
|
||||
ERR("A luminance Pixelformat shouldn't have 6 luminance bits. Returning D3DFMT_L6V5U5 for now!!\n");
|
||||
return WINED3DFMT_L6V5U5;
|
||||
return WINED3DFMT_R5G5_SNORM_L6_UNORM;
|
||||
|
||||
case 8:
|
||||
if(DDPixelFormat->u1.dwAlphaBitDepth == 8)
|
||||
return WINED3DFMT_A8L8;
|
||||
return WINED3DFMT_L8A8_UNORM;
|
||||
ERR("Unknown Alpha / Lumincase bit depth combination\n");
|
||||
return WINED3DFMT_UNKNOWN;
|
||||
}
|
||||
@ -496,10 +496,10 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
{
|
||||
case 6:
|
||||
ERR("A luminance Pixelformat shouldn't have 6 luminance bits. Returning D3DFMT_L6V5U5 for now!!\n");
|
||||
return WINED3DFMT_L6V5U5;
|
||||
return WINED3DFMT_R5G5_SNORM_L6_UNORM;
|
||||
|
||||
case 8:
|
||||
return WINED3DFMT_L8;
|
||||
return WINED3DFMT_L8_UNORM;
|
||||
|
||||
default:
|
||||
ERR("Unknown luminance-only bit depth 0x%x\n", DDPixelFormat->u1.dwLuminanceBitCount);
|
||||
@ -522,20 +522,20 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
FIXME("15 bit depth buffer not handled yet, assuming 16 bit\n");
|
||||
case 16:
|
||||
if(DDPixelFormat->u2.dwStencilBitDepth == 1)
|
||||
return WINED3DFMT_D15S1;
|
||||
return WINED3DFMT_S1_UINT_D15_UNORM;
|
||||
|
||||
FIXME("Don't know how to handle a 16 bit Z buffer with %d bit stencil buffer pixelformat\n", DDPixelFormat->u2.dwStencilBitDepth);
|
||||
return WINED3DFMT_UNKNOWN;
|
||||
|
||||
case 24:
|
||||
FIXME("Don't know how to handle a 24 bit depth buffer with stencil bits\n");
|
||||
return WINED3DFMT_D24S8;
|
||||
return WINED3DFMT_S8_UINT_D24_UNORM;
|
||||
|
||||
case 32:
|
||||
if(DDPixelFormat->u2.dwStencilBitDepth == 8)
|
||||
return WINED3DFMT_D24S8;
|
||||
return WINED3DFMT_S8_UINT_D24_UNORM;
|
||||
else
|
||||
return WINED3DFMT_D24X4S4;
|
||||
return WINED3DFMT_S4X4_UINT_D24_UNORM;
|
||||
|
||||
default:
|
||||
ERR("Unknown Z buffer depth %d\n", DDPixelFormat->u1.dwZBufferBitDepth);
|
||||
@ -557,12 +557,12 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
FIXME("24 Bit depth buffer, treating like a 32 bit one\n");
|
||||
case 32:
|
||||
if(DDPixelFormat->u3.dwZBitMask == 0x00FFFFFF) {
|
||||
return WINED3DFMT_D24X8;
|
||||
return WINED3DFMT_X8D24_UNORM;
|
||||
} else if(DDPixelFormat->u3.dwZBitMask == 0xFFFFFFFF) {
|
||||
return WINED3DFMT_D32;
|
||||
return WINED3DFMT_D32_UNORM;
|
||||
}
|
||||
FIXME("Unhandled 32 bit depth buffer bitmasks, returning WINED3DFMT_D24X8\n");
|
||||
return WINED3DFMT_D24X8; /* That's most likely to make games happy */
|
||||
return WINED3DFMT_X8D24_UNORM; /* That's most likely to make games happy */
|
||||
|
||||
default:
|
||||
ERR("Unsupported Z buffer depth %d\n", DDPixelFormat->u1.dwZBufferBitDepth);
|
||||
@ -628,14 +628,14 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
(DDPixelFormat->u3.dwBumpDvBitMask == 0x000003e0) &&
|
||||
(DDPixelFormat->u4.dwBumpLuminanceBitMask == 0x0000fc00) )
|
||||
{
|
||||
return WINED3DFMT_L6V5U5;
|
||||
return WINED3DFMT_R5G5_SNORM_L6_UNORM;
|
||||
}
|
||||
else if ( (DDPixelFormat->u1.dwBumpBitCount == 32 ) &&
|
||||
(DDPixelFormat->u2.dwBumpDuBitMask == 0x000000ff) &&
|
||||
(DDPixelFormat->u3.dwBumpDvBitMask == 0x0000ff00) &&
|
||||
(DDPixelFormat->u4.dwBumpLuminanceBitMask == 0x00ff0000) )
|
||||
{
|
||||
return WINED3DFMT_X8L8V8U8;
|
||||
return WINED3DFMT_R8G8_SNORM_L8X8_UNORM;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -223,11 +223,11 @@ static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct win
|
||||
else if (is_ffp_color) FIXME("test FLOAT16 fixed function processing colors\n");
|
||||
*float16_used = TRUE;
|
||||
}
|
||||
else if (check_d3dcolor && format == WINED3DFMT_A8R8G8B8)
|
||||
else if (check_d3dcolor && format == WINED3DFMT_B8G8R8A8_UNORM)
|
||||
{
|
||||
ret = buffer_process_converted_attribute(This, CONV_D3DCOLOR, attrib, stride_this_run);
|
||||
|
||||
if (!is_ffp_color) FIXME("Test for non-color fixed function WINED3DFMT_A8R8G8B8 format\n");
|
||||
if (!is_ffp_color) FIXME("Test for non-color fixed function WINED3DFMT_B8G8R8A8_UNORM format\n");
|
||||
}
|
||||
else if (is_ffp_position && format == WINED3DFMT_R32G32B32A32_FLOAT)
|
||||
{
|
||||
|
@ -922,10 +922,10 @@ static int WineD3D_ChoosePixelFormat(IWineD3DDeviceImpl *This, HDC hdc,
|
||||
* Likely a lot of other new bugs will be exposed. For that reason request a depth stencil surface all the
|
||||
* time. It can cause a slight performance hit but fixes a lot of regressions. A fixme reminds of that this
|
||||
* issue needs to be fixed. */
|
||||
if (ds_format_desc->format != WINED3DFMT_D24S8)
|
||||
if (ds_format_desc->format != WINED3DFMT_S8_UINT_D24_UNORM)
|
||||
{
|
||||
FIXME("Add OpenGL context recreation support to SetDepthStencilSurface\n");
|
||||
ds_format_desc = getFormatDescEntry(WINED3DFMT_D24S8, &This->adapter->gl_info);
|
||||
ds_format_desc = getFormatDescEntry(WINED3DFMT_S8_UINT_D24_UNORM, &This->adapter->gl_info);
|
||||
}
|
||||
|
||||
getDepthStencilBits(ds_format_desc, &depthBits, &stencilBits);
|
||||
@ -1137,18 +1137,18 @@ struct wined3d_context *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceI
|
||||
if(wined3d_settings.offscreen_rendering_mode == ORM_BACKBUFFER) {
|
||||
auxBuffers = TRUE;
|
||||
|
||||
if (color_format_desc->format == WINED3DFMT_X4R4G4B4)
|
||||
color_format_desc = getFormatDescEntry(WINED3DFMT_A4R4G4B4, &This->adapter->gl_info);
|
||||
else if (color_format_desc->format == WINED3DFMT_X8R8G8B8)
|
||||
color_format_desc = getFormatDescEntry(WINED3DFMT_A8R8G8B8, &This->adapter->gl_info);
|
||||
if (color_format_desc->format == WINED3DFMT_B4G4R4X4_UNORM)
|
||||
color_format_desc = getFormatDescEntry(WINED3DFMT_B4G4R4A4_UNORM, &This->adapter->gl_info);
|
||||
else if (color_format_desc->format == WINED3DFMT_B8G8R8X8_UNORM)
|
||||
color_format_desc = getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, &This->adapter->gl_info);
|
||||
}
|
||||
|
||||
/* DirectDraw supports 8bit paletted render targets and these are used by old games like Starcraft and C&C.
|
||||
* Most modern hardware doesn't support 8bit natively so we perform some form of 8bit -> 32bit conversion.
|
||||
* The conversion (ab)uses the alpha component for storing the palette index. For this reason we require
|
||||
* a format with 8bit alpha, so request A8R8G8B8. */
|
||||
if (color_format_desc->format == WINED3DFMT_P8)
|
||||
color_format_desc = getFormatDescEntry(WINED3DFMT_A8R8G8B8, &This->adapter->gl_info);
|
||||
if (color_format_desc->format == WINED3DFMT_P8_UINT)
|
||||
color_format_desc = getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, &This->adapter->gl_info);
|
||||
|
||||
/* Retrieve the depth stencil format from the present parameters.
|
||||
* The choice of the proper format can give a nice performance boost
|
||||
|
@ -70,8 +70,8 @@ static void cubetexture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3
|
||||
ActivateContext(device, NULL, CTXUSAGE_RESOURCELOAD);
|
||||
}
|
||||
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8
|
||||
|| This->resource.format_desc->format == WINED3DFMT_A8P8)
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT
|
||||
|| This->resource.format_desc->format == WINED3DFMT_P8_UINT_A8_UNORM)
|
||||
{
|
||||
for (i = 0; i < This->baseTexture.levels; ++i)
|
||||
{
|
||||
|
@ -298,7 +298,7 @@ void device_stream_info_from_declaration(IWineD3DDeviceImpl *This,
|
||||
stream_info->elements[idx].stream_idx = element->input_slot;
|
||||
stream_info->elements[idx].buffer_object = buffer_object;
|
||||
|
||||
if (!GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA) && element->format_desc->format == WINED3DFMT_A8R8G8B8)
|
||||
if (!GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA) && element->format_desc->format == WINED3DFMT_B8G8R8A8_UNORM)
|
||||
{
|
||||
stream_info->swizzle_map |= 1 << idx;
|
||||
}
|
||||
@ -360,7 +360,8 @@ void device_stream_info_from_strided(IWineD3DDeviceImpl *This,
|
||||
{
|
||||
if (!stream_info->elements[i].format_desc) continue;
|
||||
|
||||
if (!GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA) && stream_info->elements[i].format_desc->format == WINED3DFMT_A8R8G8B8)
|
||||
if (!GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA)
|
||||
&& stream_info->elements[i].format_desc->format == WINED3DFMT_B8G8R8A8_UNORM)
|
||||
{
|
||||
stream_info->swizzle_map |= 1 << i;
|
||||
}
|
||||
@ -1655,7 +1656,7 @@ static unsigned int ConvertFvfToDeclaration(IWineD3DDeviceImpl *This, /* For the
|
||||
}
|
||||
if (has_blend && (num_blends > 0)) {
|
||||
if (((fvf & WINED3DFVF_XYZB5) == WINED3DFVF_XYZB2) && (fvf & WINED3DFVF_LASTBETA_D3DCOLOR))
|
||||
elements[idx].format = WINED3DFMT_A8R8G8B8;
|
||||
elements[idx].format = WINED3DFMT_B8G8R8A8_UNORM;
|
||||
else {
|
||||
switch(num_blends) {
|
||||
case 1: elements[idx].format = WINED3DFMT_R32_FLOAT; break;
|
||||
@ -1675,7 +1676,7 @@ static unsigned int ConvertFvfToDeclaration(IWineD3DDeviceImpl *This, /* For the
|
||||
(((fvf & WINED3DFVF_XYZB5) == WINED3DFVF_XYZB2) && (fvf & WINED3DFVF_LASTBETA_D3DCOLOR)))
|
||||
elements[idx].format = WINED3DFMT_R8G8B8A8_UINT;
|
||||
else if (fvf & WINED3DFVF_LASTBETA_D3DCOLOR)
|
||||
elements[idx].format = WINED3DFMT_A8R8G8B8;
|
||||
elements[idx].format = WINED3DFMT_B8G8R8A8_UNORM;
|
||||
else
|
||||
elements[idx].format = WINED3DFMT_R32_FLOAT;
|
||||
elements[idx].usage = WINED3DDECLUSAGE_BLENDINDICES;
|
||||
@ -1695,13 +1696,13 @@ static unsigned int ConvertFvfToDeclaration(IWineD3DDeviceImpl *This, /* For the
|
||||
idx++;
|
||||
}
|
||||
if (has_diffuse) {
|
||||
elements[idx].format = WINED3DFMT_A8R8G8B8;
|
||||
elements[idx].format = WINED3DFMT_B8G8R8A8_UNORM;
|
||||
elements[idx].usage = WINED3DDECLUSAGE_COLOR;
|
||||
elements[idx].usage_idx = 0;
|
||||
idx++;
|
||||
}
|
||||
if (has_specular) {
|
||||
elements[idx].format = WINED3DFMT_A8R8G8B8;
|
||||
elements[idx].format = WINED3DFMT_B8G8R8A8_UNORM;
|
||||
elements[idx].usage = WINED3DDECLUSAGE_COLOR;
|
||||
elements[idx].usage_idx = 1;
|
||||
idx++;
|
||||
@ -1884,7 +1885,7 @@ static void IWineD3DDeviceImpl_LoadLogo(IWineD3DDeviceImpl *This, const char *fi
|
||||
bm.bmHeight = 32;
|
||||
}
|
||||
|
||||
hr = IWineD3DDevice_CreateSurface((IWineD3DDevice *) This, bm.bmWidth, bm.bmHeight, WINED3DFMT_R5G6B5, TRUE,
|
||||
hr = IWineD3DDevice_CreateSurface((IWineD3DDevice *)This, bm.bmWidth, bm.bmHeight, WINED3DFMT_B5G6R5_UNORM, TRUE,
|
||||
FALSE, 0, &This->logo_surface, 0, WINED3DPOOL_DEFAULT, WINED3DMULTISAMPLE_NONE, 0, SURFACE_OPENGL,
|
||||
NULL, &wined3d_null_parent_ops);
|
||||
if(FAILED(hr)) {
|
||||
@ -5457,14 +5458,15 @@ static void dirtify_p8_texture_samplers(IWineD3DDeviceImpl *device)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < MAX_COMBINED_SAMPLERS; i++) {
|
||||
IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl*)device->stateBlock->textures[i];
|
||||
if (texture && (texture->resource.format_desc->format == WINED3DFMT_P8
|
||||
|| texture->resource.format_desc->format == WINED3DFMT_A8P8))
|
||||
{
|
||||
IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(i));
|
||||
}
|
||||
for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i)
|
||||
{
|
||||
IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl*)device->stateBlock->textures[i];
|
||||
if (texture && (texture->resource.format_desc->format == WINED3DFMT_P8_UINT
|
||||
|| texture->resource.format_desc->format == WINED3DFMT_P8_UINT_A8_UNORM))
|
||||
{
|
||||
IWineD3DDeviceImpl_MarkStateDirty(device, STATE_SAMPLER(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DDeviceImpl_SetPaletteEntries(IWineD3DDevice *iface, UINT PaletteNumber, CONST PALETTEENTRY* pEntries) {
|
||||
@ -5994,8 +5996,9 @@ static inline DWORD argb_to_fmt(DWORD color, WINED3DFORMAT destfmt) {
|
||||
unsigned int r, g, b, a;
|
||||
DWORD ret;
|
||||
|
||||
if(destfmt == WINED3DFMT_A8R8G8B8 || destfmt == WINED3DFMT_X8R8G8B8 ||
|
||||
destfmt == WINED3DFMT_R8G8B8)
|
||||
if (destfmt == WINED3DFMT_B8G8R8A8_UNORM
|
||||
|| destfmt == WINED3DFMT_B8G8R8X8_UNORM
|
||||
|| destfmt == WINED3DFMT_B8G8R8_UNORM)
|
||||
return color;
|
||||
|
||||
TRACE("Converting color %08x to format %s\n", color, debug_d3dformat(destfmt));
|
||||
@ -6007,7 +6010,7 @@ static inline DWORD argb_to_fmt(DWORD color, WINED3DFORMAT destfmt) {
|
||||
|
||||
switch(destfmt)
|
||||
{
|
||||
case WINED3DFMT_R5G6B5:
|
||||
case WINED3DFMT_B5G6R5_UNORM:
|
||||
if(r == 0xff && g == 0xff && b == 0xff) return 0xffff;
|
||||
r = (r * 32) / 256;
|
||||
g = (g * 64) / 256;
|
||||
@ -6018,8 +6021,8 @@ static inline DWORD argb_to_fmt(DWORD color, WINED3DFORMAT destfmt) {
|
||||
TRACE("Returning %08x\n", ret);
|
||||
return ret;
|
||||
|
||||
case WINED3DFMT_X1R5G5B5:
|
||||
case WINED3DFMT_A1R5G5B5:
|
||||
case WINED3DFMT_B5G5R5X1_UNORM:
|
||||
case WINED3DFMT_B5G5R5A1_UNORM:
|
||||
a = (a * 2) / 256;
|
||||
r = (r * 32) / 256;
|
||||
g = (g * 32) / 256;
|
||||
@ -6035,8 +6038,8 @@ static inline DWORD argb_to_fmt(DWORD color, WINED3DFORMAT destfmt) {
|
||||
TRACE("Returning %08x\n", a);
|
||||
return a;
|
||||
|
||||
case WINED3DFMT_X4R4G4B4:
|
||||
case WINED3DFMT_A4R4G4B4:
|
||||
case WINED3DFMT_B4G4R4X4_UNORM:
|
||||
case WINED3DFMT_B4G4R4A4_UNORM:
|
||||
a = (a * 16) / 256;
|
||||
r = (r * 16) / 256;
|
||||
g = (g * 16) / 256;
|
||||
@ -6048,7 +6051,7 @@ static inline DWORD argb_to_fmt(DWORD color, WINED3DFORMAT destfmt) {
|
||||
TRACE("Returning %08x\n", ret);
|
||||
return ret;
|
||||
|
||||
case WINED3DFMT_R3G3B2:
|
||||
case WINED3DFMT_B2G3R3_UNORM:
|
||||
r = (r * 8) / 256;
|
||||
g = (g * 8) / 256;
|
||||
b = (b * 4) / 256;
|
||||
@ -6058,7 +6061,7 @@ static inline DWORD argb_to_fmt(DWORD color, WINED3DFORMAT destfmt) {
|
||||
TRACE("Returning %08x\n", ret);
|
||||
return ret;
|
||||
|
||||
case WINED3DFMT_X8B8G8R8:
|
||||
case WINED3DFMT_R8G8B8X8_UNORM:
|
||||
case WINED3DFMT_R8G8B8A8_UNORM:
|
||||
ret = a << 24;
|
||||
ret |= b << 16;
|
||||
@ -6067,7 +6070,7 @@ static inline DWORD argb_to_fmt(DWORD color, WINED3DFORMAT destfmt) {
|
||||
TRACE("Returning %08x\n", ret);
|
||||
return ret;
|
||||
|
||||
case WINED3DFMT_A2R10G10B10:
|
||||
case WINED3DFMT_B10G10R10A2_UNORM:
|
||||
a = (a * 4) / 256;
|
||||
r = (r * 1024) / 256;
|
||||
g = (g * 1024) / 256;
|
||||
@ -6563,7 +6566,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetCursorProperties(IWineD3DDevice* i
|
||||
WINED3DLOCKED_RECT rect;
|
||||
|
||||
/* MSDN: Cursor must be A8R8G8B8 */
|
||||
if (WINED3DFMT_A8R8G8B8 != pSur->resource.format_desc->format)
|
||||
if (pSur->resource.format_desc->format != WINED3DFMT_B8G8R8A8_UNORM)
|
||||
{
|
||||
ERR("(%p) : surface(%p) has an invalid format\n", This, pCursorBitmap);
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
@ -6589,7 +6592,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetCursorProperties(IWineD3DDevice* i
|
||||
This->cursorHeight = pSur->currentDesc.Height;
|
||||
if (SUCCEEDED(IWineD3DSurface_LockRect(pCursorBitmap, &rect, NULL, WINED3DLOCK_READONLY)))
|
||||
{
|
||||
const struct GlPixelFormatDesc *glDesc = getFormatDescEntry(WINED3DFMT_A8R8G8B8, &GLINFO_LOCATION);
|
||||
const struct GlPixelFormatDesc *glDesc =
|
||||
getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, &GLINFO_LOCATION);
|
||||
char *mem, *bits = rect.pBits;
|
||||
GLint intfmt = glDesc->glInternal;
|
||||
GLint format = glDesc->glFormat;
|
||||
|
@ -2076,15 +2076,15 @@ static UINT WINAPI IWineD3DImpl_GetAdapterModeCount(IWineD3D *iface, UINT Ad
|
||||
if (mode.dmBitsPerPel == 32 || mode.dmBitsPerPel == 16) ++i;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_X8R8G8B8:
|
||||
case WINED3DFMT_B8G8R8X8_UNORM:
|
||||
if (mode.dmBitsPerPel == 32) ++i;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_R5G6B5:
|
||||
case WINED3DFMT_B5G6R5_UNORM:
|
||||
if (mode.dmBitsPerPel == 16) ++i;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_P8:
|
||||
case WINED3DFMT_P8_UINT:
|
||||
if (mode.dmBitsPerPel == 8) ++i;
|
||||
break;
|
||||
|
||||
@ -2136,13 +2136,13 @@ static HRESULT WINAPI IWineD3DImpl_EnumAdapterModes(IWineD3D *iface, UINT Adapte
|
||||
if (DevModeW.dmBitsPerPel == 32 ||
|
||||
DevModeW.dmBitsPerPel == 16) i++;
|
||||
break;
|
||||
case WINED3DFMT_X8R8G8B8:
|
||||
case WINED3DFMT_B8G8R8X8_UNORM:
|
||||
if (DevModeW.dmBitsPerPel == 32) i++;
|
||||
break;
|
||||
case WINED3DFMT_R5G6B5:
|
||||
case WINED3DFMT_B5G6R5_UNORM:
|
||||
if (DevModeW.dmBitsPerPel == 16) i++;
|
||||
break;
|
||||
case WINED3DFMT_P8:
|
||||
case WINED3DFMT_P8_UINT:
|
||||
if (DevModeW.dmBitsPerPel == 8) i++;
|
||||
break;
|
||||
default:
|
||||
@ -2367,7 +2367,7 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithDepthFmt(const struct wined3
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ((format_desc->format == WINED3DFMT_D16_LOCKABLE) || (format_desc->format == WINED3DFMT_D32F_LOCKABLE))
|
||||
if ((format_desc->format == WINED3DFMT_D16_LOCKABLE) || (format_desc->format == WINED3DFMT_D32_FLOAT))
|
||||
lockable = TRUE;
|
||||
|
||||
/* On some modern cards like the Geforce8/9 GLX doesn't offer some dephthstencil formats which D3D9 reports.
|
||||
@ -2550,10 +2550,10 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter
|
||||
* At the moment we assume that fullscreen and windowed have the same capabilities */
|
||||
|
||||
/* There are only 4 display formats */
|
||||
if(!((DisplayFormat == WINED3DFMT_R5G6B5) ||
|
||||
(DisplayFormat == WINED3DFMT_X1R5G5B5) ||
|
||||
(DisplayFormat == WINED3DFMT_X8R8G8B8) ||
|
||||
(DisplayFormat == WINED3DFMT_A2R10G10B10)))
|
||||
if (!(DisplayFormat == WINED3DFMT_B5G6R5_UNORM
|
||||
|| DisplayFormat == WINED3DFMT_B5G5R5X1_UNORM
|
||||
|| DisplayFormat == WINED3DFMT_B8G8R8X8_UNORM
|
||||
|| DisplayFormat == WINED3DFMT_B10G10R10A2_UNORM))
|
||||
{
|
||||
TRACE_(d3d_caps)("Format %s unsupported as display format\n", debug_d3dformat(DisplayFormat));
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
@ -2573,25 +2573,32 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceType(IWineD3D *iface, UINT Adapter
|
||||
}
|
||||
|
||||
/* In FULLSCREEN mode R5G6B5 can only be mixed with backbuffer format R5G6B5 */
|
||||
if( (DisplayFormat == WINED3DFMT_R5G6B5) && (BackBufferFormat != WINED3DFMT_R5G6B5) ) {
|
||||
if (DisplayFormat == WINED3DFMT_B5G6R5_UNORM && BackBufferFormat != WINED3DFMT_B5G6R5_UNORM)
|
||||
{
|
||||
TRACE_(d3d_caps)("Unsupported display/backbuffer format combination %s/%s\n", debug_d3dformat(DisplayFormat), debug_d3dformat(BackBufferFormat));
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
}
|
||||
|
||||
/* In FULLSCREEN mode X1R5G5B5 can only be mixed with backbuffer format *1R5G5B5 */
|
||||
if( (DisplayFormat == WINED3DFMT_X1R5G5B5) && !((BackBufferFormat == WINED3DFMT_X1R5G5B5) || (BackBufferFormat == WINED3DFMT_A1R5G5B5)) ) {
|
||||
if (DisplayFormat == WINED3DFMT_B5G5R5X1_UNORM
|
||||
&& !(BackBufferFormat == WINED3DFMT_B5G5R5X1_UNORM || BackBufferFormat == WINED3DFMT_B5G5R5A1_UNORM))
|
||||
{
|
||||
TRACE_(d3d_caps)("Unsupported display/backbuffer format combination %s/%s\n", debug_d3dformat(DisplayFormat), debug_d3dformat(BackBufferFormat));
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
}
|
||||
|
||||
/* In FULLSCREEN mode X8R8G8B8 can only be mixed with backbuffer format *8R8G8B8 */
|
||||
if( (DisplayFormat == WINED3DFMT_X8R8G8B8) && !((BackBufferFormat == WINED3DFMT_X8R8G8B8) || (BackBufferFormat == WINED3DFMT_A8R8G8B8)) ) {
|
||||
if (DisplayFormat == WINED3DFMT_B8G8R8X8_UNORM
|
||||
&& !(BackBufferFormat == WINED3DFMT_B8G8R8X8_UNORM || BackBufferFormat == WINED3DFMT_B8G8R8A8_UNORM))
|
||||
{
|
||||
TRACE_(d3d_caps)("Unsupported display/backbuffer format combination %s/%s\n", debug_d3dformat(DisplayFormat), debug_d3dformat(BackBufferFormat));
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
}
|
||||
|
||||
/* A2R10G10B10 is only allowed in fullscreen mode and it can only be mixed with backbuffer format A2R10G10B10 */
|
||||
if( (DisplayFormat == WINED3DFMT_A2R10G10B10) && ((BackBufferFormat != WINED3DFMT_A2R10G10B10) || Windowed)) {
|
||||
if (DisplayFormat == WINED3DFMT_B10G10R10A2_UNORM
|
||||
&& (BackBufferFormat != WINED3DFMT_B10G10R10A2_UNORM || Windowed))
|
||||
{
|
||||
TRACE_(d3d_caps)("Unsupported display/backbuffer format combination %s/%s\n", debug_d3dformat(DisplayFormat), debug_d3dformat(BackBufferFormat));
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
}
|
||||
@ -2615,8 +2622,8 @@ static BOOL CheckBumpMapCapability(struct WineD3DAdapter *adapter,
|
||||
{
|
||||
case WINED3DFMT_R8G8_SNORM:
|
||||
case WINED3DFMT_R16G16_SNORM:
|
||||
case WINED3DFMT_L6V5U5:
|
||||
case WINED3DFMT_X8L8V8U8:
|
||||
case WINED3DFMT_R5G5_SNORM_L6_UNORM:
|
||||
case WINED3DFMT_R8G8_SNORM_L8X8_UNORM:
|
||||
case WINED3DFMT_R8G8B8A8_SNORM:
|
||||
/* Ask the fixed function pipeline implementation if it can deal
|
||||
* with the conversion. If we've got a GL extension giving native
|
||||
@ -2740,11 +2747,11 @@ static BOOL CheckSrgbReadCapability(struct WineD3DAdapter *adapter, const struct
|
||||
|
||||
switch (format_desc->format)
|
||||
{
|
||||
case WINED3DFMT_A8R8G8B8:
|
||||
case WINED3DFMT_X8R8G8B8:
|
||||
case WINED3DFMT_A4R4G4B4:
|
||||
case WINED3DFMT_L8:
|
||||
case WINED3DFMT_A8L8:
|
||||
case WINED3DFMT_B8G8R8A8_UNORM:
|
||||
case WINED3DFMT_B8G8R8X8_UNORM:
|
||||
case WINED3DFMT_B4G4R4A4_UNORM:
|
||||
case WINED3DFMT_L8_UNORM:
|
||||
case WINED3DFMT_L8A8_UNORM:
|
||||
case WINED3DFMT_DXT1:
|
||||
case WINED3DFMT_DXT2:
|
||||
case WINED3DFMT_DXT3:
|
||||
@ -2766,7 +2773,7 @@ static BOOL CheckSrgbWriteCapability(struct WineD3DAdapter *adapter,
|
||||
/* Only offer SRGB writing on X8R8G8B8/A8R8G8B8 when we use ARB or GLSL shaders as we are
|
||||
* doing the color fixup in shaders.
|
||||
* Note Windows drivers (at least on the Geforce 8800) also offer this on R5G6B5. */
|
||||
if ((format_desc->format == WINED3DFMT_X8R8G8B8) || (format_desc->format == WINED3DFMT_A8R8G8B8))
|
||||
if ((format_desc->format == WINED3DFMT_B8G8R8X8_UNORM) || (format_desc->format == WINED3DFMT_B8G8R8A8_UNORM))
|
||||
{
|
||||
int vs_selected_mode;
|
||||
int ps_selected_mode;
|
||||
@ -2819,48 +2826,48 @@ static BOOL CheckTextureCapability(struct WineD3DAdapter *adapter,
|
||||
/*****
|
||||
* supported: RGB(A) formats
|
||||
*/
|
||||
case WINED3DFMT_R8G8B8: /* Enable for dx7, blacklisted for 8 and 9 above */
|
||||
case WINED3DFMT_A8R8G8B8:
|
||||
case WINED3DFMT_X8R8G8B8:
|
||||
case WINED3DFMT_R5G6B5:
|
||||
case WINED3DFMT_X1R5G5B5:
|
||||
case WINED3DFMT_A1R5G5B5:
|
||||
case WINED3DFMT_A4R4G4B4:
|
||||
case WINED3DFMT_B8G8R8_UNORM: /* Enable for dx7, blacklisted for 8 and 9 above */
|
||||
case WINED3DFMT_B8G8R8A8_UNORM:
|
||||
case WINED3DFMT_B8G8R8X8_UNORM:
|
||||
case WINED3DFMT_B5G6R5_UNORM:
|
||||
case WINED3DFMT_B5G5R5X1_UNORM:
|
||||
case WINED3DFMT_B5G5R5A1_UNORM:
|
||||
case WINED3DFMT_B4G4R4A4_UNORM:
|
||||
case WINED3DFMT_A8_UNORM:
|
||||
case WINED3DFMT_X4R4G4B4:
|
||||
case WINED3DFMT_B4G4R4X4_UNORM:
|
||||
case WINED3DFMT_R8G8B8A8_UNORM:
|
||||
case WINED3DFMT_X8B8G8R8:
|
||||
case WINED3DFMT_A2R10G10B10:
|
||||
case WINED3DFMT_R8G8B8X8_UNORM:
|
||||
case WINED3DFMT_B10G10R10A2_UNORM:
|
||||
case WINED3DFMT_R10G10B10A2_UNORM:
|
||||
case WINED3DFMT_R16G16_UNORM:
|
||||
TRACE_(d3d_caps)("[OK]\n");
|
||||
return TRUE;
|
||||
|
||||
case WINED3DFMT_R3G3B2:
|
||||
case WINED3DFMT_B2G3R3_UNORM:
|
||||
TRACE_(d3d_caps)("[FAILED] - Not supported on Windows\n");
|
||||
return FALSE;
|
||||
|
||||
/*****
|
||||
* supported: Palettized
|
||||
*/
|
||||
case WINED3DFMT_P8:
|
||||
case WINED3DFMT_P8_UINT:
|
||||
TRACE_(d3d_caps)("[OK]\n");
|
||||
return TRUE;
|
||||
/* No Windows driver offers A8P8, so don't offer it either */
|
||||
case WINED3DFMT_A8P8:
|
||||
/* No Windows driver offers WINED3DFMT_P8_UINT_A8_UNORM, so don't offer it either */
|
||||
case WINED3DFMT_P8_UINT_A8_UNORM:
|
||||
return FALSE;
|
||||
|
||||
/*****
|
||||
* Supported: (Alpha)-Luminance
|
||||
*/
|
||||
case WINED3DFMT_L8:
|
||||
case WINED3DFMT_A8L8:
|
||||
case WINED3DFMT_L16:
|
||||
case WINED3DFMT_L8_UNORM:
|
||||
case WINED3DFMT_L8A8_UNORM:
|
||||
case WINED3DFMT_L16_UNORM:
|
||||
TRACE_(d3d_caps)("[OK]\n");
|
||||
return TRUE;
|
||||
|
||||
/* Not supported on Windows, thus disabled */
|
||||
case WINED3DFMT_A4L4:
|
||||
case WINED3DFMT_L4A4_UNORM:
|
||||
TRACE_(d3d_caps)("[FAILED] - not supported on windows\n");
|
||||
return FALSE;
|
||||
|
||||
@ -2869,13 +2876,13 @@ static BOOL CheckTextureCapability(struct WineD3DAdapter *adapter,
|
||||
*/
|
||||
case WINED3DFMT_D16_LOCKABLE:
|
||||
case WINED3DFMT_D16_UNORM:
|
||||
case WINED3DFMT_D15S1:
|
||||
case WINED3DFMT_D24X8:
|
||||
case WINED3DFMT_D24X4S4:
|
||||
case WINED3DFMT_D24S8:
|
||||
case WINED3DFMT_D24FS8:
|
||||
case WINED3DFMT_D32:
|
||||
case WINED3DFMT_D32F_LOCKABLE:
|
||||
case WINED3DFMT_S1_UINT_D15_UNORM:
|
||||
case WINED3DFMT_X8D24_UNORM:
|
||||
case WINED3DFMT_S4X4_UINT_D24_UNORM:
|
||||
case WINED3DFMT_S8_UINT_D24_UNORM:
|
||||
case WINED3DFMT_S8_UINT_D24_FLOAT:
|
||||
case WINED3DFMT_D32_UNORM:
|
||||
case WINED3DFMT_D32_FLOAT:
|
||||
return TRUE;
|
||||
|
||||
/*****
|
||||
@ -2883,8 +2890,8 @@ static BOOL CheckTextureCapability(struct WineD3DAdapter *adapter,
|
||||
* GL_NV_texture_shader). Emulated by shaders
|
||||
*/
|
||||
case WINED3DFMT_R8G8_SNORM:
|
||||
case WINED3DFMT_X8L8V8U8:
|
||||
case WINED3DFMT_L6V5U5:
|
||||
case WINED3DFMT_R8G8_SNORM_L8X8_UNORM:
|
||||
case WINED3DFMT_R5G5_SNORM_L6_UNORM:
|
||||
case WINED3DFMT_R8G8B8A8_SNORM:
|
||||
case WINED3DFMT_R16G16_SNORM:
|
||||
/* Ask the shader backend if it can deal with the conversion. If
|
||||
@ -2919,15 +2926,15 @@ static BOOL CheckTextureCapability(struct WineD3DAdapter *adapter,
|
||||
case WINED3DFMT_R16_UINT:
|
||||
case WINED3DFMT_R32_UINT:
|
||||
case WINED3DFMT_R16G16B16A16_SNORM:
|
||||
case WINED3DFMT_A2W10V10U10:
|
||||
case WINED3DFMT_W11V11U10:
|
||||
case WINED3DFMT_R10G10B10_SNORM_A2_UNORM:
|
||||
case WINED3DFMT_R10G11B11_SNORM:
|
||||
TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
|
||||
return FALSE;
|
||||
|
||||
/*****
|
||||
* WINED3DFMT_CxV8U8: Not supported right now
|
||||
* WINED3DFMT_R8G8_SNORM_Cx: Not supported right now
|
||||
*/
|
||||
case WINED3DFMT_CxV8U8:
|
||||
case WINED3DFMT_R8G8_SNORM_Cx:
|
||||
TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
|
||||
return FALSE;
|
||||
|
||||
@ -2946,7 +2953,7 @@ static BOOL CheckTextureCapability(struct WineD3DAdapter *adapter,
|
||||
|
||||
/* Not supported */
|
||||
case WINED3DFMT_R16G16B16A16_UNORM:
|
||||
case WINED3DFMT_A8R3G3B2:
|
||||
case WINED3DFMT_B2G3R3A8_UNORM:
|
||||
TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
|
||||
return FALSE;
|
||||
|
||||
@ -3044,24 +3051,24 @@ static BOOL CheckSurfaceCapability(struct WineD3DAdapter *adapter, const struct
|
||||
if(SurfaceType == SURFACE_GDI) {
|
||||
switch(check_format_desc->format)
|
||||
{
|
||||
case WINED3DFMT_R8G8B8:
|
||||
case WINED3DFMT_A8R8G8B8:
|
||||
case WINED3DFMT_X8R8G8B8:
|
||||
case WINED3DFMT_R5G6B5:
|
||||
case WINED3DFMT_X1R5G5B5:
|
||||
case WINED3DFMT_A1R5G5B5:
|
||||
case WINED3DFMT_A4R4G4B4:
|
||||
case WINED3DFMT_R3G3B2:
|
||||
case WINED3DFMT_B8G8R8_UNORM:
|
||||
case WINED3DFMT_B8G8R8A8_UNORM:
|
||||
case WINED3DFMT_B8G8R8X8_UNORM:
|
||||
case WINED3DFMT_B5G6R5_UNORM:
|
||||
case WINED3DFMT_B5G5R5X1_UNORM:
|
||||
case WINED3DFMT_B5G5R5A1_UNORM:
|
||||
case WINED3DFMT_B4G4R4A4_UNORM:
|
||||
case WINED3DFMT_B2G3R3_UNORM:
|
||||
case WINED3DFMT_A8_UNORM:
|
||||
case WINED3DFMT_A8R3G3B2:
|
||||
case WINED3DFMT_X4R4G4B4:
|
||||
case WINED3DFMT_B2G3R3A8_UNORM:
|
||||
case WINED3DFMT_B4G4R4X4_UNORM:
|
||||
case WINED3DFMT_R10G10B10A2_UNORM:
|
||||
case WINED3DFMT_R8G8B8A8_UNORM:
|
||||
case WINED3DFMT_X8B8G8R8:
|
||||
case WINED3DFMT_R8G8B8X8_UNORM:
|
||||
case WINED3DFMT_R16G16_UNORM:
|
||||
case WINED3DFMT_A2R10G10B10:
|
||||
case WINED3DFMT_B10G10R10A2_UNORM:
|
||||
case WINED3DFMT_R16G16B16A16_UNORM:
|
||||
case WINED3DFMT_P8:
|
||||
case WINED3DFMT_P8_UINT:
|
||||
TRACE_(d3d_caps)("[OK]\n");
|
||||
return TRUE;
|
||||
default:
|
||||
@ -3551,12 +3558,12 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
|
||||
* except of R32F.
|
||||
*/
|
||||
switch(CheckFormat) {
|
||||
case WINED3DFMT_P8:
|
||||
case WINED3DFMT_A4L4:
|
||||
case WINED3DFMT_P8_UINT:
|
||||
case WINED3DFMT_L4A4_UNORM:
|
||||
case WINED3DFMT_R32_FLOAT:
|
||||
case WINED3DFMT_R16_FLOAT:
|
||||
case WINED3DFMT_X8L8V8U8:
|
||||
case WINED3DFMT_L6V5U5:
|
||||
case WINED3DFMT_R8G8_SNORM_L8X8_UNORM:
|
||||
case WINED3DFMT_R5G5_SNORM_L6_UNORM:
|
||||
case WINED3DFMT_R16G16_UNORM:
|
||||
TRACE_(d3d_caps)("[FAILED] - No converted formats on volumes\n");
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
|
@ -128,7 +128,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context
|
||||
element = &si->elements[WINED3D_FFP_DIFFUSE];
|
||||
diffuse = element->data + streamOffset[element->stream_idx];
|
||||
|
||||
if (num_untracked_materials && element->format_desc->format != WINED3DFMT_A8R8G8B8)
|
||||
if (num_untracked_materials && element->format_desc->format != WINED3DFMT_B8G8R8A8_UNORM)
|
||||
FIXME("Implement diffuse color tracking from %s\n", debug_d3dformat(element->format_desc->format));
|
||||
}
|
||||
else
|
||||
@ -149,7 +149,7 @@ static void drawStridedSlow(IWineD3DDevice *iface, const struct wined3d_context
|
||||
{
|
||||
if (GL_SUPPORT(EXT_FOG_COORD))
|
||||
{
|
||||
if (element->format_desc->format == WINED3DFMT_A8R8G8B8) specular_fog = TRUE;
|
||||
if (element->format_desc->format == WINED3DFMT_B8G8R8A8_UNORM) specular_fog = TRUE;
|
||||
else FIXME("Implement fog coordinates from %s\n", debug_d3dformat(element->format_desc->format));
|
||||
}
|
||||
else
|
||||
@ -332,7 +332,7 @@ static inline void send_attribute(IWineD3DDeviceImpl *This, WINED3DFORMAT format
|
||||
case WINED3DFMT_R8G8B8A8_UINT:
|
||||
GL_EXTCALL(glVertexAttrib4ubvARB(index, ptr));
|
||||
break;
|
||||
case WINED3DFMT_A8R8G8B8:
|
||||
case WINED3DFMT_B8G8R8A8_UNORM:
|
||||
if (GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA))
|
||||
{
|
||||
const DWORD *src = ptr;
|
||||
|
@ -4068,7 +4068,7 @@ static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock,
|
||||
case WINED3DFMT_R8G8B8A8_UINT:
|
||||
GL_EXTCALL(glVertexAttrib4NubvARB(i, ptr));
|
||||
break;
|
||||
case WINED3DFMT_A8R8G8B8:
|
||||
case WINED3DFMT_B8G8R8A8_UNORM:
|
||||
if (GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA))
|
||||
{
|
||||
const DWORD *src = (const DWORD *)ptr;
|
||||
|
@ -334,7 +334,7 @@ static BOOL primary_render_target_is_p8(IWineD3DDeviceImpl *device)
|
||||
if (device->render_targets && device->render_targets[0]) {
|
||||
IWineD3DSurfaceImpl* render_target = (IWineD3DSurfaceImpl*)device->render_targets[0];
|
||||
if ((render_target->resource.usage & WINED3DUSAGE_RENDERTARGET)
|
||||
&& (render_target->resource.format_desc->format == WINED3DFMT_P8))
|
||||
&& (render_target->resource.format_desc->format == WINED3DFMT_P8_UINT))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@ -351,7 +351,7 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
|
||||
const struct GlPixelFormatDesc *format_desc = This->resource.format_desc;
|
||||
|
||||
/* Only support read back of converted P8 surfaces */
|
||||
if (This->Flags & SFLAG_CONVERTED && format_desc->format != WINED3DFMT_P8)
|
||||
if (This->Flags & SFLAG_CONVERTED && format_desc->format != WINED3DFMT_P8_UINT)
|
||||
{
|
||||
FIXME("Read back converted textures unsupported, format=%s\n", debug_d3dformat(format_desc->format));
|
||||
return;
|
||||
@ -390,7 +390,7 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
|
||||
int dst_pitch = 0;
|
||||
|
||||
/* In case of P8 the index is stored in the alpha component if the primary render target uses P8 */
|
||||
if (format_desc->format == WINED3DFMT_P8 && primary_render_target_is_p8(This->resource.wineD3DDevice))
|
||||
if (format_desc->format == WINED3DFMT_P8_UINT && primary_render_target_is_p8(This->resource.wineD3DDevice))
|
||||
{
|
||||
format = GL_ALPHA;
|
||||
type = GL_UNSIGNED_BYTE;
|
||||
@ -764,8 +764,8 @@ void surface_internal_preload(IWineD3DSurface *iface, enum WINED3DSRGB srgb)
|
||||
ActivateContext(device, NULL, CTXUSAGE_RESOURCELOAD);
|
||||
}
|
||||
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8
|
||||
|| This->resource.format_desc->format == WINED3DFMT_A8P8)
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT
|
||||
|| This->resource.format_desc->format == WINED3DFMT_P8_UINT_A8_UNORM)
|
||||
{
|
||||
if(palette9_changed(This)) {
|
||||
TRACE("Reloading surface because the d3d8/9 palette was changed\n");
|
||||
@ -960,7 +960,7 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, v
|
||||
|
||||
switch(This->resource.format_desc->format)
|
||||
{
|
||||
case WINED3DFMT_P8:
|
||||
case WINED3DFMT_P8_UINT:
|
||||
{
|
||||
if(primary_render_target_is_p8(myDevice)) {
|
||||
/* In case of P8 render targets the index is stored in the alpha component */
|
||||
@ -1066,7 +1066,7 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, v
|
||||
row = HeapAlloc(GetProcessHeap(), 0, len);
|
||||
if(!row) {
|
||||
ERR("Out of memory\n");
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8) HeapFree(GetProcessHeap(), 0, mem);
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT) HeapFree(GetProcessHeap(), 0, mem);
|
||||
LEAVE_GL();
|
||||
return;
|
||||
}
|
||||
@ -1096,7 +1096,7 @@ static void read_from_framebuffer(IWineD3DSurfaceImpl *This, CONST RECT *rect, v
|
||||
* the same color but we have no choice.
|
||||
* In case of P8 render targets, the index is stored in the alpha component so no conversion is needed.
|
||||
*/
|
||||
if ((This->resource.format_desc->format == WINED3DFMT_P8) && !primary_render_target_is_p8(myDevice))
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT && !primary_render_target_is_p8(myDevice))
|
||||
{
|
||||
const PALETTEENTRY *pal = NULL;
|
||||
DWORD width = pitch / 3;
|
||||
@ -1629,8 +1629,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHD
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8
|
||||
|| This->resource.format_desc->format == WINED3DFMT_A8P8)
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT
|
||||
|| This->resource.format_desc->format == WINED3DFMT_P8_UINT_A8_UNORM)
|
||||
{
|
||||
/* GetDC on palettized formats is unsupported in D3D9, and the method is missing in
|
||||
D3D8, so this should only be used for DX <=7 surfaces (with non-device palettes) */
|
||||
@ -1722,7 +1722,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
/* Ok, now look if we have to do any conversion */
|
||||
switch(This->resource.format_desc->format)
|
||||
{
|
||||
case WINED3DFMT_P8:
|
||||
case WINED3DFMT_P8_UINT:
|
||||
/* ****************
|
||||
Paletted Texture
|
||||
**************** */
|
||||
@ -1757,7 +1757,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
|
||||
break;
|
||||
|
||||
case WINED3DFMT_R3G3B2:
|
||||
case WINED3DFMT_B2G3R3_UNORM:
|
||||
/* **********************
|
||||
GL_UNSIGNED_BYTE_3_3_2
|
||||
********************** */
|
||||
@ -1768,7 +1768,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
}
|
||||
break;
|
||||
|
||||
case WINED3DFMT_R5G6B5:
|
||||
case WINED3DFMT_B5G6R5_UNORM:
|
||||
if (colorkey_active) {
|
||||
*convert = CONVERT_CK_565;
|
||||
*format = GL_RGBA;
|
||||
@ -1777,7 +1777,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
}
|
||||
break;
|
||||
|
||||
case WINED3DFMT_X1R5G5B5:
|
||||
case WINED3DFMT_B5G5R5X1_UNORM:
|
||||
if (colorkey_active) {
|
||||
*convert = CONVERT_CK_5551;
|
||||
*format = GL_BGRA;
|
||||
@ -1786,7 +1786,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
}
|
||||
break;
|
||||
|
||||
case WINED3DFMT_R8G8B8:
|
||||
case WINED3DFMT_B8G8R8_UNORM:
|
||||
if (colorkey_active) {
|
||||
*convert = CONVERT_CK_RGB24;
|
||||
*format = GL_RGBA;
|
||||
@ -1796,7 +1796,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
}
|
||||
break;
|
||||
|
||||
case WINED3DFMT_X8R8G8B8:
|
||||
case WINED3DFMT_B8G8R8X8_UNORM:
|
||||
if (colorkey_active) {
|
||||
*convert = CONVERT_RGB32_888;
|
||||
*format = GL_RGBA;
|
||||
@ -1813,7 +1813,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
*target_bpp = 3;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_L6V5U5:
|
||||
case WINED3DFMT_R5G5_SNORM_L6_UNORM:
|
||||
*convert = CONVERT_L6V5U5;
|
||||
if(GL_SUPPORT(NV_TEXTURE_SHADER)) {
|
||||
*target_bpp = 3;
|
||||
@ -1826,7 +1826,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
}
|
||||
break;
|
||||
|
||||
case WINED3DFMT_X8L8V8U8:
|
||||
case WINED3DFMT_R8G8_SNORM_L8X8_UNORM:
|
||||
*convert = CONVERT_X8L8V8U8;
|
||||
*target_bpp = 4;
|
||||
if(GL_SUPPORT(NV_TEXTURE_SHADER)) {
|
||||
@ -1858,8 +1858,8 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
*target_bpp = 6;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_A4L4:
|
||||
/* A4L4 exists as an internal gl format, but for some reason there is not
|
||||
case WINED3DFMT_L4A4_UNORM:
|
||||
/* WINED3DFMT_L4A4_UNORM exists as an internal gl format, but for some reason there is not
|
||||
* format+type combination to load it. Thus convert it to A8L8, then load it
|
||||
* with A4L4 internal, but A8L8 format+type
|
||||
*/
|
||||
@ -1890,7 +1890,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
*target_bpp = 12;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_D15S1:
|
||||
case WINED3DFMT_S1_UINT_D15_UNORM:
|
||||
if (GL_SUPPORT(ARB_FRAMEBUFFER_OBJECT)
|
||||
|| GL_SUPPORT(EXT_PACKED_DEPTH_STENCIL))
|
||||
{
|
||||
@ -1899,7 +1899,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
}
|
||||
break;
|
||||
|
||||
case WINED3DFMT_D24X4S4:
|
||||
case WINED3DFMT_S4X4_UINT_D24_UNORM:
|
||||
if (GL_SUPPORT(ARB_FRAMEBUFFER_OBJECT)
|
||||
|| GL_SUPPORT(EXT_PACKED_DEPTH_STENCIL))
|
||||
{
|
||||
@ -1907,7 +1907,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
}
|
||||
break;
|
||||
|
||||
case WINED3DFMT_D24FS8:
|
||||
case WINED3DFMT_S8_UINT_D24_FLOAT:
|
||||
if (GL_SUPPORT(ARB_DEPTH_BUFFER_FLOAT))
|
||||
{
|
||||
*convert = CONVERT_D24FS8;
|
||||
@ -2507,8 +2507,8 @@ static void d3dfmt_p8_upload_palette(IWineD3DSurface *iface, CONVERT_TYPES conve
|
||||
BOOL palette9_changed(IWineD3DSurfaceImpl *This) {
|
||||
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
|
||||
|
||||
if (This->palette || (This->resource.format_desc->format != WINED3DFMT_P8
|
||||
&& This->resource.format_desc->format != WINED3DFMT_A8P8))
|
||||
if (This->palette || (This->resource.format_desc->format != WINED3DFMT_P8_UINT
|
||||
&& This->resource.format_desc->format != WINED3DFMT_P8_UINT_A8_UNORM))
|
||||
{
|
||||
/* If a ddraw-style palette is attached assume no d3d9 palette change.
|
||||
* Also the palette isn't interesting if the surface format isn't P8 or A8P8
|
||||
@ -3577,7 +3577,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
||||
|
||||
/* When blitting from a render target a texture, the texture isn't required to have a palette.
|
||||
* In this case grab the palette from the render target. */
|
||||
if ((This->resource.format_desc->format == WINED3DFMT_P8) && (This->palette == NULL))
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT && !This->palette)
|
||||
{
|
||||
paletteOverride = TRUE;
|
||||
TRACE("Source surface (%p) lacks palette, overriding palette with palette %p of destination surface (%p)\n", Src, This->palette, This);
|
||||
@ -3653,7 +3653,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
||||
* surface is not required to have a palette. Our rendering / conversion
|
||||
* code further down the road retrieves the palette from the surface, so
|
||||
* it must have a palette set. */
|
||||
if ((Src->resource.format_desc->format == WINED3DFMT_P8) && (Src->palette == NULL))
|
||||
if (Src->resource.format_desc->format == WINED3DFMT_P8_UINT && !Src->palette)
|
||||
{
|
||||
paletteOverride = TRUE;
|
||||
TRACE("Source surface (%p) lacks palette, overriding palette with palette %p of destination surface (%p)\n", Src, This->palette, This);
|
||||
@ -3853,7 +3853,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
||||
/* The color as given in the Blt function is in the format of the frame-buffer...
|
||||
* 'clear' expect it in ARGB format => we need to do some conversion :-)
|
||||
*/
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8)
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT)
|
||||
{
|
||||
DWORD alpha;
|
||||
|
||||
@ -3869,7 +3869,7 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
||||
color = alpha;
|
||||
}
|
||||
}
|
||||
else if (This->resource.format_desc->format == WINED3DFMT_R5G6B5)
|
||||
else if (This->resource.format_desc->format == WINED3DFMT_B5G6R5_UNORM)
|
||||
{
|
||||
if (DDBltFx->u5.dwFillColor == 0xFFFF) {
|
||||
color = 0xFFFFFFFF;
|
||||
@ -3880,12 +3880,12 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const
|
||||
((DDBltFx->u5.dwFillColor & 0x001F) << 3));
|
||||
}
|
||||
}
|
||||
else if ((This->resource.format_desc->format == WINED3DFMT_R8G8B8)
|
||||
|| (This->resource.format_desc->format == WINED3DFMT_X8R8G8B8))
|
||||
else if (This->resource.format_desc->format == WINED3DFMT_B8G8R8_UNORM
|
||||
|| This->resource.format_desc->format == WINED3DFMT_B8G8R8X8_UNORM)
|
||||
{
|
||||
color = 0xFF000000 | DDBltFx->u5.dwFillColor;
|
||||
}
|
||||
else if (This->resource.format_desc->format == WINED3DFMT_A8R8G8B8)
|
||||
else if (This->resource.format_desc->format == WINED3DFMT_B8G8R8A8_UNORM)
|
||||
{
|
||||
color = DDBltFx->u5.dwFillColor;
|
||||
}
|
||||
@ -3918,14 +3918,14 @@ static HRESULT IWineD3DSurfaceImpl_BltZ(IWineD3DSurfaceImpl *This, const RECT *D
|
||||
case WINED3DFMT_D16_UNORM:
|
||||
depth = (float) DDBltFx->u5.dwFillDepth / (float) 0x0000ffff;
|
||||
break;
|
||||
case WINED3DFMT_D15S1:
|
||||
case WINED3DFMT_S1_UINT_D15_UNORM:
|
||||
depth = (float) DDBltFx->u5.dwFillDepth / (float) 0x0000fffe;
|
||||
break;
|
||||
case WINED3DFMT_D24S8:
|
||||
case WINED3DFMT_D24X8:
|
||||
case WINED3DFMT_S8_UINT_D24_UNORM:
|
||||
case WINED3DFMT_X8D24_UNORM:
|
||||
depth = (float) DDBltFx->u5.dwFillDepth / (float) 0x00ffffff;
|
||||
break;
|
||||
case WINED3DFMT_D32:
|
||||
case WINED3DFMT_D32_UNORM:
|
||||
depth = (float) DDBltFx->u5.dwFillDepth / (float) 0xffffffff;
|
||||
break;
|
||||
default:
|
||||
@ -4058,8 +4058,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface)
|
||||
|
||||
if (!pal) return WINED3D_OK;
|
||||
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8
|
||||
|| This->resource.format_desc->format == WINED3DFMT_A8P8)
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT
|
||||
|| This->resource.format_desc->format == WINED3DFMT_P8_UINT_A8_UNORM)
|
||||
{
|
||||
int bpp;
|
||||
GLenum format, internal, type;
|
||||
@ -4171,9 +4171,9 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
|
||||
is used in combination with texture uploads (RTL_READTEX/RTL_TEXTEX). The reason is that EXT_PALETTED_TEXTURE
|
||||
doesn't work in combination with ARB_TEXTURE_RECTANGLE.
|
||||
*/
|
||||
if(This->Flags & SFLAG_NONPOW2 && GL_SUPPORT(ARB_TEXTURE_RECTANGLE)
|
||||
&& !((This->resource.format_desc->format == WINED3DFMT_P8) && GL_SUPPORT(EXT_PALETTED_TEXTURE)
|
||||
&& (wined3d_settings.rendertargetlock_mode == RTL_READTEX)))
|
||||
if (This->Flags & SFLAG_NONPOW2 && GL_SUPPORT(ARB_TEXTURE_RECTANGLE)
|
||||
&& !(This->resource.format_desc->format == WINED3DFMT_P8_UINT && GL_SUPPORT(EXT_PALETTED_TEXTURE)
|
||||
&& wined3d_settings.rendertargetlock_mode == RTL_READTEX))
|
||||
{
|
||||
This->texture_target = GL_TEXTURE_RECTANGLE_ARB;
|
||||
This->pow2Width = This->currentDesc.Width;
|
||||
@ -4900,7 +4900,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
|
||||
|
||||
This->Flags |= SFLAG_CONVERTED;
|
||||
}
|
||||
else if ((This->resource.format_desc->format == WINED3DFMT_P8)
|
||||
else if (This->resource.format_desc->format == WINED3DFMT_P8_UINT
|
||||
&& (GL_SUPPORT(EXT_PALETTED_TEXTURE) || GL_SUPPORT(ARB_FRAGMENT_PROGRAM)))
|
||||
{
|
||||
d3dfmt_p8_upload_palette(iface, convert);
|
||||
|
@ -599,22 +599,22 @@ HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) {
|
||||
masks = (DWORD *)b_info->bmiColors;
|
||||
switch (This->resource.format_desc->format)
|
||||
{
|
||||
case WINED3DFMT_R8G8B8:
|
||||
case WINED3DFMT_B8G8R8_UNORM:
|
||||
usage = DIB_RGB_COLORS;
|
||||
b_info->bmiHeader.biCompression = BI_RGB;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_X1R5G5B5:
|
||||
case WINED3DFMT_A1R5G5B5:
|
||||
case WINED3DFMT_A4R4G4B4:
|
||||
case WINED3DFMT_X4R4G4B4:
|
||||
case WINED3DFMT_R3G3B2:
|
||||
case WINED3DFMT_A8R3G3B2:
|
||||
case WINED3DFMT_B5G5R5X1_UNORM:
|
||||
case WINED3DFMT_B5G5R5A1_UNORM:
|
||||
case WINED3DFMT_B4G4R4A4_UNORM:
|
||||
case WINED3DFMT_B4G4R4X4_UNORM:
|
||||
case WINED3DFMT_B2G3R3_UNORM:
|
||||
case WINED3DFMT_B2G3R3A8_UNORM:
|
||||
case WINED3DFMT_R10G10B10A2_UNORM:
|
||||
case WINED3DFMT_R8G8B8A8_UNORM:
|
||||
case WINED3DFMT_X8B8G8R8:
|
||||
case WINED3DFMT_A2R10G10B10:
|
||||
case WINED3DFMT_R5G6B5:
|
||||
case WINED3DFMT_R8G8B8X8_UNORM:
|
||||
case WINED3DFMT_B10G10R10A2_UNORM:
|
||||
case WINED3DFMT_B5G6R5_UNORM:
|
||||
case WINED3DFMT_R16G16B16A16_UNORM:
|
||||
usage = 0;
|
||||
b_info->bmiHeader.biCompression = BI_BITFIELDS;
|
||||
@ -757,9 +757,9 @@ struct d3dfmt_convertor_desc {
|
||||
|
||||
static const struct d3dfmt_convertor_desc convertors[] =
|
||||
{
|
||||
{WINED3DFMT_R32_FLOAT, WINED3DFMT_R16_FLOAT, convert_r32_float_r16_float},
|
||||
{WINED3DFMT_R5G6B5, WINED3DFMT_X8R8G8B8, convert_r5g6b5_x8r8g8b8},
|
||||
{WINED3DFMT_A8R8G8B8, WINED3DFMT_X8R8G8B8, convert_a8r8g8b8_x8r8g8b8},
|
||||
{WINED3DFMT_R32_FLOAT, WINED3DFMT_R16_FLOAT, convert_r32_float_r16_float},
|
||||
{WINED3DFMT_B5G6R5_UNORM, WINED3DFMT_B8G8R8X8_UNORM, convert_r5g6b5_x8r8g8b8},
|
||||
{WINED3DFMT_B8G8R8A8_UNORM, WINED3DFMT_B8G8R8X8_UNORM, convert_a8r8g8b8_x8r8g8b8},
|
||||
};
|
||||
|
||||
static inline const struct d3dfmt_convertor_desc *find_convertor(WINED3DFORMAT from, WINED3DFORMAT to)
|
||||
|
@ -313,7 +313,7 @@ const char* filename)
|
||||
}
|
||||
fprintf(f, "P6\n%d %d\n255\n", This->pow2Width, This->pow2Height);
|
||||
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8)
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT)
|
||||
{
|
||||
unsigned char table[256][3];
|
||||
int i;
|
||||
@ -418,8 +418,8 @@ static HRESULT WINAPI IWineGDISurfaceImpl_GetDC(IWineD3DSurface *iface, HDC *pHD
|
||||
return hr;
|
||||
}
|
||||
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8
|
||||
|| This->resource.format_desc->format == WINED3DFMT_A8P8)
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT
|
||||
|| This->resource.format_desc->format == WINED3DFMT_P8_UINT_A8_UNORM)
|
||||
{
|
||||
unsigned int n;
|
||||
const PALETTEENTRY *pal = NULL;
|
||||
|
@ -120,7 +120,8 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
|
||||
cursor.resource.ref = 1;
|
||||
cursor.resource.wineD3DDevice = This->wineD3DDevice;
|
||||
cursor.resource.pool = WINED3DPOOL_SCRATCH;
|
||||
cursor.resource.format_desc = getFormatDescEntry(WINED3DFMT_A8R8G8B8, &This->wineD3DDevice->adapter->gl_info);
|
||||
cursor.resource.format_desc =
|
||||
getFormatDescEntry(WINED3DFMT_B8G8R8A8_UNORM, &This->wineD3DDevice->adapter->gl_info);
|
||||
cursor.resource.resourceType = WINED3DRTYPE_SURFACE;
|
||||
cursor.texture_name = This->wineD3DDevice->cursorTexture;
|
||||
cursor.texture_target = GL_TEXTURE_2D;
|
||||
|
@ -67,8 +67,8 @@ static void texture_internal_preload(IWineD3DBaseTexture *iface, enum WINED3DSRG
|
||||
ActivateContext(device, NULL, CTXUSAGE_RESOURCELOAD);
|
||||
}
|
||||
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8
|
||||
|| This->resource.format_desc->format == WINED3DFMT_A8P8)
|
||||
if (This->resource.format_desc->format == WINED3DFMT_P8_UINT
|
||||
|| This->resource.format_desc->format == WINED3DFMT_P8_UINT_A8_UNORM)
|
||||
{
|
||||
for (i = 0; i < This->baseTexture.levels; ++i)
|
||||
{
|
||||
@ -528,8 +528,8 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
|
||||
texture->baseTexture.minMipLookup = minMipLookup_noFilter;
|
||||
}
|
||||
else if (gl_info->supported[ARB_TEXTURE_RECTANGLE] && (width != pow2_width || height != pow2_height)
|
||||
&& !((format_desc->format == WINED3DFMT_P8) && gl_info->supported[EXT_PALETTED_TEXTURE]
|
||||
&& (wined3d_settings.rendertargetlock_mode == RTL_READTEX)))
|
||||
&& !(format_desc->format == WINED3DFMT_P8_UINT && gl_info->supported[EXT_PALETTED_TEXTURE]
|
||||
&& wined3d_settings.rendertargetlock_mode == RTL_READTEX))
|
||||
{
|
||||
if ((width != 1) || (height != 1)) texture->baseTexture.pow2Matrix_identity = FALSE;
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
* Copyright 2005 Oliver Stieber
|
||||
* Copyright 2006-2008 Henri Verbeet
|
||||
* Copyright 2007-2008 Stefan Dösinger for CodeWeavers
|
||||
* Copyright 2009 Henri Verbeet for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@ -49,89 +50,88 @@ struct StaticPixelFormatDesc
|
||||
*/
|
||||
static const struct StaticPixelFormatDesc formats[] =
|
||||
{
|
||||
/* WINED3DFORMAT alphamask redmask greenmask bluemask bpp depth stencil isFourcc */
|
||||
{WINED3DFMT_UNKNOWN, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, FALSE},
|
||||
/* FourCC formats, kept here to have WINED3DFMT_R8G8B8(=20) at position 20 */
|
||||
{WINED3DFMT_UYVY, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, TRUE },
|
||||
{WINED3DFMT_YUY2, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, TRUE },
|
||||
{WINED3DFMT_YV12, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_DXT1, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_DXT2, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_DXT3, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_DXT4, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_DXT5, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_MULTI2_ARGB8, 0x0, 0x0, 0x0, 0x0, 1/*?*/, 0, 0, TRUE },
|
||||
{WINED3DFMT_G8R8_G8B8, 0x0, 0x0, 0x0, 0x0, 1/*?*/, 0, 0, TRUE },
|
||||
{WINED3DFMT_R8G8_B8G8, 0x0, 0x0, 0x0, 0x0, 1/*?*/, 0, 0, TRUE },
|
||||
/* WINED3DFORMAT alphamask redmask greenmask bluemask bpp depth stencil isFourcc */
|
||||
{WINED3DFMT_UNKNOWN, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, FALSE},
|
||||
/* FourCC formats */
|
||||
{WINED3DFMT_UYVY, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, TRUE },
|
||||
{WINED3DFMT_YUY2, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, TRUE },
|
||||
{WINED3DFMT_YV12, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_DXT1, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_DXT2, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_DXT3, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_DXT4, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_DXT5, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_MULTI2_ARGB8, 0x0, 0x0, 0x0, 0x0, 1/*?*/, 0, 0, TRUE },
|
||||
{WINED3DFMT_G8R8_G8B8, 0x0, 0x0, 0x0, 0x0, 1/*?*/, 0, 0, TRUE },
|
||||
{WINED3DFMT_R8G8_B8G8, 0x0, 0x0, 0x0, 0x0, 1/*?*/, 0, 0, TRUE },
|
||||
/* IEEE formats */
|
||||
{WINED3DFMT_R32_FLOAT, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R32G32_FLOAT, 0x0, 0x0, 0x0, 0x0, 8, 0, 0, FALSE},
|
||||
{WINED3DFMT_R32G32B32_FLOAT, 0x0, 0x0, 0x0, 0x0, 12, 0, 0, FALSE},
|
||||
{WINED3DFMT_R32G32B32A32_FLOAT, 0x1, 0x0, 0x0, 0x0, 16, 0, 0, FALSE},
|
||||
{WINED3DFMT_R32_FLOAT, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R32G32_FLOAT, 0x0, 0x0, 0x0, 0x0, 8, 0, 0, FALSE},
|
||||
{WINED3DFMT_R32G32B32_FLOAT, 0x0, 0x0, 0x0, 0x0, 12, 0, 0, FALSE},
|
||||
{WINED3DFMT_R32G32B32A32_FLOAT, 0x1, 0x0, 0x0, 0x0, 16, 0, 0, FALSE},
|
||||
/* Hmm? */
|
||||
{WINED3DFMT_CxV8U8, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_R8G8_SNORM_Cx, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
/* Float */
|
||||
{WINED3DFMT_R16_FLOAT, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16_FLOAT, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16_SINT, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16B16A16_FLOAT, 0x1, 0x0, 0x0, 0x0, 8, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16B16A16_SINT, 0x1, 0x0, 0x0, 0x0, 8, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16_FLOAT, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16_FLOAT, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16_SINT, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16B16A16_FLOAT, 0x1, 0x0, 0x0, 0x0, 8, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16B16A16_SINT, 0x1, 0x0, 0x0, 0x0, 8, 0, 0, FALSE},
|
||||
/* Palettized formats */
|
||||
{WINED3DFMT_A8P8, 0x0000ff00, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_P8, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, FALSE},
|
||||
{WINED3DFMT_P8_UINT_A8_UNORM, 0x0000ff00, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_P8_UINT, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, FALSE},
|
||||
/* Standard ARGB formats. */
|
||||
{WINED3DFMT_R8G8B8, 0x0, 0x00ff0000, 0x0000ff00, 0x000000ff, 3, 0, 0, FALSE},
|
||||
{WINED3DFMT_A8R8G8B8, 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_X8R8G8B8, 0x0, 0x00ff0000, 0x0000ff00, 0x000000ff, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R5G6B5, 0x0, 0x0000f800, 0x000007e0, 0x0000001f, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_X1R5G5B5, 0x0, 0x00007c00, 0x000003e0, 0x0000001f, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_A1R5G5B5, 0x00008000, 0x00007c00, 0x000003e0, 0x0000001f, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_A4R4G4B4, 0x0000f000, 0x00000f00, 0x000000f0, 0x0000000f, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_R3G3B2, 0x0, 0x000000e0, 0x0000001c, 0x00000003, 1, 0, 0, FALSE},
|
||||
{WINED3DFMT_A8_UNORM, 0x000000ff, 0x0, 0x0, 0x0, 1, 0, 0, FALSE},
|
||||
{WINED3DFMT_A8R3G3B2, 0x0000ff00, 0x000000e0, 0x0000001c, 0x00000003, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_X4R4G4B4, 0x0, 0x00000f00, 0x000000f0, 0x0000000f, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_R10G10B10A2_UNORM, 0xc0000000, 0x000003ff, 0x000ffc00, 0x3ff00000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R10G10B10A2_UINT, 0xc0000000, 0x000003ff, 0x000ffc00, 0x3ff00000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R10G10B10A2_SNORM, 0xc0000000, 0x000003ff, 0x000ffc00, 0x3ff00000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R8G8B8A8_UNORM, 0xff000000, 0x000000ff, 0x0000ff00, 0x00ff0000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R8G8B8A8_UINT, 0xff000000, 0x000000ff, 0x0000ff00, 0x00ff0000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_X8B8G8R8, 0x0, 0x000000ff, 0x0000ff00, 0x00ff0000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16_UNORM, 0x0, 0x0000ffff, 0xffff0000, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_A2R10G10B10, 0xc0000000, 0x3ff00000, 0x000ffc00, 0x000003ff, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16B16A16_UNORM, 0x1, 0x0000ffff, 0xffff0000, 0x0, 8, 0, 0, FALSE},
|
||||
{WINED3DFMT_B8G8R8_UNORM, 0x0, 0x00ff0000, 0x0000ff00, 0x000000ff, 3, 0, 0, FALSE},
|
||||
{WINED3DFMT_B8G8R8A8_UNORM, 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_B8G8R8X8_UNORM, 0x0, 0x00ff0000, 0x0000ff00, 0x000000ff, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_B5G6R5_UNORM, 0x0, 0x0000f800, 0x000007e0, 0x0000001f, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_B5G5R5X1_UNORM, 0x0, 0x00007c00, 0x000003e0, 0x0000001f, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_B5G5R5A1_UNORM, 0x00008000, 0x00007c00, 0x000003e0, 0x0000001f, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_B4G4R4A4_UNORM, 0x0000f000, 0x00000f00, 0x000000f0, 0x0000000f, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_B2G3R3_UNORM, 0x0, 0x000000e0, 0x0000001c, 0x00000003, 1, 0, 0, FALSE},
|
||||
{WINED3DFMT_A8_UNORM, 0x000000ff, 0x0, 0x0, 0x0, 1, 0, 0, FALSE},
|
||||
{WINED3DFMT_B2G3R3A8_UNORM, 0x0000ff00, 0x000000e0, 0x0000001c, 0x00000003, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_B4G4R4X4_UNORM, 0x0, 0x00000f00, 0x000000f0, 0x0000000f, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_R10G10B10A2_UNORM, 0xc0000000, 0x000003ff, 0x000ffc00, 0x3ff00000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R10G10B10A2_UINT, 0xc0000000, 0x000003ff, 0x000ffc00, 0x3ff00000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R10G10B10A2_SNORM, 0xc0000000, 0x000003ff, 0x000ffc00, 0x3ff00000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R8G8B8A8_UNORM, 0xff000000, 0x000000ff, 0x0000ff00, 0x00ff0000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R8G8B8A8_UINT, 0xff000000, 0x000000ff, 0x0000ff00, 0x00ff0000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R8G8B8X8_UNORM, 0x0, 0x000000ff, 0x0000ff00, 0x00ff0000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16_UNORM, 0x0, 0x0000ffff, 0xffff0000, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_B10G10R10A2_UNORM, 0xc0000000, 0x3ff00000, 0x000ffc00, 0x000003ff, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16B16A16_UNORM, 0x1, 0x0000ffff, 0xffff0000, 0x0, 8, 0, 0, FALSE},
|
||||
/* Luminance */
|
||||
{WINED3DFMT_L8, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, FALSE},
|
||||
{WINED3DFMT_A8L8, 0x0000ff00, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_A4L4, 0x000000f0, 0x0, 0x0, 0x0, 1, 0, 0, FALSE},
|
||||
{WINED3DFMT_L8_UNORM, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, FALSE},
|
||||
{WINED3DFMT_L8A8_UNORM, 0x0000ff00, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_L4A4_UNORM, 0x000000f0, 0x0, 0x0, 0x0, 1, 0, 0, FALSE},
|
||||
{WINED3DFMT_L16_UNORM, 0x0, 0x0, 0x0, 0x0, 2, 16, 0, FALSE},
|
||||
/* Bump mapping stuff */
|
||||
{WINED3DFMT_R8G8_SNORM, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_L6V5U5, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_X8L8V8U8, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R8G8B8A8_SNORM, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16_SNORM, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_W11V11U10, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_A2W10V10U10, 0xb0000000, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R8G8_SNORM, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_R5G5_SNORM_L6_UNORM, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_R8G8_SNORM_L8X8_UNORM, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R8G8B8A8_SNORM, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16_SNORM, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R10G11B11_SNORM, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R10G10B10_SNORM_A2_UNORM,0xb0000000,0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
/* Depth stencil formats */
|
||||
{WINED3DFMT_D16_LOCKABLE, 0x0, 0x0, 0x0, 0x0, 2, 16, 0, FALSE},
|
||||
{WINED3DFMT_D32, 0x0, 0x0, 0x0, 0x0, 4, 32, 0, FALSE},
|
||||
{WINED3DFMT_D15S1, 0x0, 0x0, 0x0, 0x0, 2, 15, 1, FALSE},
|
||||
{WINED3DFMT_D24S8, 0x0, 0x0, 0x0, 0x0, 4, 24, 8, FALSE},
|
||||
{WINED3DFMT_D24X8, 0x0, 0x0, 0x0, 0x0, 4, 24, 0, FALSE},
|
||||
{WINED3DFMT_D24X4S4, 0x0, 0x0, 0x0, 0x0, 4, 24, 4, FALSE},
|
||||
{WINED3DFMT_D16_UNORM, 0x0, 0x0, 0x0, 0x0, 2, 16, 0, FALSE},
|
||||
{WINED3DFMT_L16, 0x0, 0x0, 0x0, 0x0, 2, 16, 0, FALSE},
|
||||
{WINED3DFMT_D32F_LOCKABLE, 0x0, 0x0, 0x0, 0x0, 4, 32, 0, FALSE},
|
||||
{WINED3DFMT_D24FS8, 0x0, 0x0, 0x0, 0x0, 4, 24, 8, FALSE},
|
||||
/* Is this a vertex buffer? */
|
||||
{WINED3DFMT_VERTEXDATA, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16_UINT, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_R32_UINT, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16B16A16_SNORM, 0x0, 0x0, 0x0, 0x0, 8, 0, 0, FALSE},
|
||||
{WINED3DFMT_D16_LOCKABLE, 0x0, 0x0, 0x0, 0x0, 2, 16, 0, FALSE},
|
||||
{WINED3DFMT_D32_UNORM, 0x0, 0x0, 0x0, 0x0, 4, 32, 0, FALSE},
|
||||
{WINED3DFMT_S1_UINT_D15_UNORM, 0x0, 0x0, 0x0, 0x0, 2, 15, 1, FALSE},
|
||||
{WINED3DFMT_S8_UINT_D24_UNORM, 0x0, 0x0, 0x0, 0x0, 4, 24, 8, FALSE},
|
||||
{WINED3DFMT_X8D24_UNORM, 0x0, 0x0, 0x0, 0x0, 4, 24, 0, FALSE},
|
||||
{WINED3DFMT_S4X4_UINT_D24_UNORM, 0x0, 0x0, 0x0, 0x0, 4, 24, 4, FALSE},
|
||||
{WINED3DFMT_D16_UNORM, 0x0, 0x0, 0x0, 0x0, 2, 16, 0, FALSE},
|
||||
{WINED3DFMT_D32_FLOAT, 0x0, 0x0, 0x0, 0x0, 4, 32, 0, FALSE},
|
||||
{WINED3DFMT_S8_UINT_D24_FLOAT, 0x0, 0x0, 0x0, 0x0, 4, 24, 8, FALSE},
|
||||
{WINED3DFMT_VERTEXDATA, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16_UINT, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_R32_UINT, 0x0, 0x0, 0x0, 0x0, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R16G16B16A16_SNORM, 0x0, 0x0, 0x0, 0x0, 8, 0, 0, FALSE},
|
||||
/* Vendor-specific formats */
|
||||
{WINED3DFMT_ATI2N, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_NVHU, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, TRUE },
|
||||
{WINED3DFMT_NVHS, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, TRUE },
|
||||
{WINED3DFMT_ATI2N, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, TRUE },
|
||||
{WINED3DFMT_NVHU, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, TRUE },
|
||||
{WINED3DFMT_NVHS, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, TRUE },
|
||||
};
|
||||
|
||||
struct wined3d_format_compression_info
|
||||
@ -169,7 +169,7 @@ static const struct wined3d_format_vertex_info format_vertex_info[] =
|
||||
{WINED3DFMT_R32G32_FLOAT, WINED3D_FFP_EMIT_FLOAT2, 2, GL_FLOAT, 2, GL_FALSE, sizeof(float)},
|
||||
{WINED3DFMT_R32G32B32_FLOAT, WINED3D_FFP_EMIT_FLOAT3, 3, GL_FLOAT, 3, GL_FALSE, sizeof(float)},
|
||||
{WINED3DFMT_R32G32B32A32_FLOAT, WINED3D_FFP_EMIT_FLOAT4, 4, GL_FLOAT, 4, GL_FALSE, sizeof(float)},
|
||||
{WINED3DFMT_A8R8G8B8, WINED3D_FFP_EMIT_D3DCOLOR, 4, GL_UNSIGNED_BYTE, 4, GL_TRUE, sizeof(BYTE)},
|
||||
{WINED3DFMT_B8G8R8A8_UNORM, WINED3D_FFP_EMIT_D3DCOLOR, 4, GL_UNSIGNED_BYTE, 4, GL_TRUE, sizeof(BYTE)},
|
||||
{WINED3DFMT_R8G8B8A8_UINT, WINED3D_FFP_EMIT_UBYTE4, 4, GL_UNSIGNED_BYTE, 4, GL_FALSE, sizeof(BYTE)},
|
||||
{WINED3DFMT_R16G16_SINT, WINED3D_FFP_EMIT_SHORT2, 2, GL_SHORT, 2, GL_FALSE, sizeof(short int)},
|
||||
{WINED3DFMT_R16G16B16A16_SINT, WINED3D_FFP_EMIT_SHORT4, 4, GL_SHORT, 4, GL_FALSE, sizeof(short int)},
|
||||
@ -198,8 +198,8 @@ typedef struct {
|
||||
* table.
|
||||
*/
|
||||
static const GlPixelFormatDescTemplate gl_formats_template[] = {
|
||||
/* WINED3DFORMAT internal srgbInternal rtInternal
|
||||
format type
|
||||
/* WINED3DFORMAT internal srgbInternal rtInternal
|
||||
format type
|
||||
flags
|
||||
extension */
|
||||
/* FourCC formats */
|
||||
@ -209,295 +209,295 @@ static const GlPixelFormatDescTemplate gl_formats_template[] = {
|
||||
* Macs, so probably the endianess differs. This could be tested as soon as we have a Windows and MacOS on a big
|
||||
* endian machine
|
||||
*/
|
||||
{WINED3DFMT_UYVY, GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_UYVY, GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_UYVY, GL_RGB, GL_RGB, 0,
|
||||
GL_YCBCR_422_APPLE, UNSIGNED_SHORT_8_8_APPLE,
|
||||
{WINED3DFMT_UYVY, GL_RGB, GL_RGB, 0,
|
||||
GL_YCBCR_422_APPLE, UNSIGNED_SHORT_8_8_APPLE,
|
||||
WINED3DFMT_FLAG_FILTERING,
|
||||
APPLE_YCBCR_422},
|
||||
{WINED3DFMT_YUY2, GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_YUY2, GL_LUMINANCE_ALPHA, GL_LUMINANCE_ALPHA, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_YUY2, GL_RGB, GL_RGB, 0,
|
||||
GL_YCBCR_422_APPLE, UNSIGNED_SHORT_8_8_REV_APPLE,
|
||||
{WINED3DFMT_YUY2, GL_RGB, GL_RGB, 0,
|
||||
GL_YCBCR_422_APPLE, UNSIGNED_SHORT_8_8_REV_APPLE,
|
||||
WINED3DFMT_FLAG_FILTERING,
|
||||
APPLE_YCBCR_422},
|
||||
{WINED3DFMT_YV12, GL_ALPHA, GL_ALPHA, 0,
|
||||
GL_ALPHA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_YV12, GL_ALPHA, GL_ALPHA, 0,
|
||||
GL_ALPHA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_DXT1, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_DXT1, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
EXT_TEXTURE_COMPRESSION_S3TC},
|
||||
{WINED3DFMT_DXT2, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_DXT2, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
EXT_TEXTURE_COMPRESSION_S3TC},
|
||||
{WINED3DFMT_DXT3, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_DXT3, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
EXT_TEXTURE_COMPRESSION_S3TC},
|
||||
{WINED3DFMT_DXT4, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_DXT4, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
EXT_TEXTURE_COMPRESSION_S3TC},
|
||||
{WINED3DFMT_DXT5, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_DXT5, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
EXT_TEXTURE_COMPRESSION_S3TC},
|
||||
/* IEEE formats */
|
||||
{WINED3DFMT_R32_FLOAT, GL_RGB32F_ARB, GL_RGB32F_ARB, 0,
|
||||
GL_RED, GL_FLOAT,
|
||||
{WINED3DFMT_R32_FLOAT, GL_RGB32F_ARB, GL_RGB32F_ARB, 0,
|
||||
GL_RED, GL_FLOAT,
|
||||
WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_TEXTURE_FLOAT},
|
||||
{WINED3DFMT_R32_FLOAT, GL_R32F, GL_R32F, 0,
|
||||
GL_RED, GL_FLOAT,
|
||||
{WINED3DFMT_R32_FLOAT, GL_R32F, GL_R32F, 0,
|
||||
GL_RED, GL_FLOAT,
|
||||
WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_TEXTURE_RG},
|
||||
{WINED3DFMT_R32G32_FLOAT, GL_RGB32F_ARB, GL_RGB32F_ARB, 0,
|
||||
GL_RGB, GL_FLOAT,
|
||||
{WINED3DFMT_R32G32_FLOAT, GL_RGB32F_ARB, GL_RGB32F_ARB, 0,
|
||||
GL_RGB, GL_FLOAT,
|
||||
WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_TEXTURE_FLOAT},
|
||||
{WINED3DFMT_R32G32_FLOAT, GL_RG32F, GL_RG32F, 0,
|
||||
GL_RG, GL_FLOAT,
|
||||
{WINED3DFMT_R32G32_FLOAT, GL_RG32F, GL_RG32F, 0,
|
||||
GL_RG, GL_FLOAT,
|
||||
WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_TEXTURE_RG},
|
||||
{WINED3DFMT_R32G32B32A32_FLOAT, GL_RGBA32F_ARB, GL_RGBA32F_ARB, 0,
|
||||
GL_RGBA, GL_FLOAT,
|
||||
{WINED3DFMT_R32G32B32A32_FLOAT, GL_RGBA32F_ARB, GL_RGBA32F_ARB, 0,
|
||||
GL_RGBA, GL_FLOAT,
|
||||
WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_TEXTURE_FLOAT},
|
||||
/* Float */
|
||||
{WINED3DFMT_R16_FLOAT, GL_RGB16F_ARB, GL_RGB16F_ARB, 0,
|
||||
GL_RED, GL_HALF_FLOAT_ARB,
|
||||
{WINED3DFMT_R16_FLOAT, GL_RGB16F_ARB, GL_RGB16F_ARB, 0,
|
||||
GL_RED, GL_HALF_FLOAT_ARB,
|
||||
WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_TEXTURE_FLOAT},
|
||||
{WINED3DFMT_R16_FLOAT, GL_R16F, GL_R16F, 0,
|
||||
GL_RED, GL_HALF_FLOAT_ARB,
|
||||
{WINED3DFMT_R16_FLOAT, GL_R16F, GL_R16F, 0,
|
||||
GL_RED, GL_HALF_FLOAT_ARB,
|
||||
WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_TEXTURE_RG},
|
||||
{WINED3DFMT_R16G16_FLOAT, GL_RGB16F_ARB, GL_RGB16F_ARB, 0,
|
||||
GL_RGB, GL_HALF_FLOAT_ARB,
|
||||
{WINED3DFMT_R16G16_FLOAT, GL_RGB16F_ARB, GL_RGB16F_ARB, 0,
|
||||
GL_RGB, GL_HALF_FLOAT_ARB,
|
||||
WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_TEXTURE_FLOAT},
|
||||
{WINED3DFMT_R16G16_FLOAT, GL_RG16F, GL_RG16F, 0,
|
||||
GL_RG, GL_HALF_FLOAT_ARB,
|
||||
{WINED3DFMT_R16G16_FLOAT, GL_RG16F, GL_RG16F, 0,
|
||||
GL_RG, GL_HALF_FLOAT_ARB,
|
||||
WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_TEXTURE_RG},
|
||||
{WINED3DFMT_R16G16B16A16_FLOAT, GL_RGBA16F_ARB, GL_RGBA16F_ARB, 0,
|
||||
GL_RGBA, GL_HALF_FLOAT_ARB,
|
||||
{WINED3DFMT_R16G16B16A16_FLOAT, GL_RGBA16F_ARB, GL_RGBA16F_ARB, 0,
|
||||
GL_RGBA, GL_HALF_FLOAT_ARB,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_RENDERTARGET,
|
||||
ARB_TEXTURE_FLOAT},
|
||||
/* Palettized formats */
|
||||
{WINED3DFMT_P8, GL_RGBA, GL_RGBA, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_P8_UINT, GL_RGBA, GL_RGBA, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_GETDC,
|
||||
ARB_FRAGMENT_PROGRAM},
|
||||
{WINED3DFMT_P8, GL_COLOR_INDEX8_EXT, GL_COLOR_INDEX8_EXT, 0,
|
||||
GL_COLOR_INDEX, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_P8_UINT, GL_COLOR_INDEX8_EXT, GL_COLOR_INDEX8_EXT, 0,
|
||||
GL_COLOR_INDEX, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_GETDC,
|
||||
EXT_PALETTED_TEXTURE},
|
||||
/* Standard ARGB formats */
|
||||
{WINED3DFMT_R8G8B8, GL_RGB8, GL_RGB8, 0,
|
||||
GL_BGR, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_B8G8R8_UNORM, GL_RGB8, GL_RGB8, 0,
|
||||
GL_BGR, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET |
|
||||
WINED3DFMT_FLAG_GETDC,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_A8R8G8B8, GL_RGBA8, GL_SRGB8_ALPHA8_EXT, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
{WINED3DFMT_B8G8R8A8_UNORM, GL_RGBA8, GL_SRGB8_ALPHA8_EXT, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET |
|
||||
WINED3DFMT_FLAG_GETDC,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_X8R8G8B8, GL_RGB8, GL_SRGB8_EXT, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
{WINED3DFMT_B8G8R8X8_UNORM, GL_RGB8, GL_SRGB8_EXT, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET |
|
||||
WINED3DFMT_FLAG_GETDC,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_R5G6B5, GL_RGB5, GL_RGB5, GL_RGB8,
|
||||
GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
|
||||
{WINED3DFMT_B5G6R5_UNORM, GL_RGB5, GL_RGB5, GL_RGB8,
|
||||
GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET |
|
||||
WINED3DFMT_FLAG_GETDC,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_X1R5G5B5, GL_RGB5, GL_RGB5_A1, 0,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
|
||||
{WINED3DFMT_B5G5R5X1_UNORM, GL_RGB5, GL_RGB5_A1, 0,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING |
|
||||
WINED3DFMT_FLAG_GETDC,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_A1R5G5B5, GL_RGB5_A1, GL_RGB5_A1, 0,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
|
||||
{WINED3DFMT_B5G5R5A1_UNORM, GL_RGB5_A1, GL_RGB5_A1, 0,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING |
|
||||
WINED3DFMT_FLAG_GETDC,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_A4R4G4B4, GL_RGBA4, GL_SRGB8_ALPHA8_EXT, 0,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV,
|
||||
{WINED3DFMT_B4G4R4A4_UNORM, GL_RGBA4, GL_SRGB8_ALPHA8_EXT, 0,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING |
|
||||
WINED3DFMT_FLAG_GETDC,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_R3G3B2, GL_R3_G3_B2, GL_R3_G3_B2, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE_3_3_2,
|
||||
{WINED3DFMT_B2G3R3_UNORM, GL_R3_G3_B2, GL_R3_G3_B2, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE_3_3_2,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_A8_UNORM, GL_ALPHA8, GL_ALPHA8, 0,
|
||||
GL_ALPHA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_A8_UNORM, GL_ALPHA8, GL_ALPHA8, 0,
|
||||
GL_ALPHA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_X4R4G4B4, GL_RGB4, GL_RGB4, 0,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV,
|
||||
{WINED3DFMT_B4G4R4X4_UNORM, GL_RGB4, GL_RGB4, 0,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_GETDC,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_R10G10B10A2_UNORM, GL_RGB10_A2, GL_RGB10_A2, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV,
|
||||
{WINED3DFMT_R10G10B10A2_UNORM, GL_RGB10_A2, GL_RGB10_A2, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_R8G8B8A8_UNORM, GL_RGBA8, GL_RGBA8, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
{WINED3DFMT_R8G8B8A8_UNORM, GL_RGBA8, GL_RGBA8, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_GETDC,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_X8B8G8R8, GL_RGB8, GL_RGB8, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
{WINED3DFMT_R8G8B8X8_UNORM, GL_RGB8, GL_RGB8, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_GETDC,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_R16G16_UNORM, GL_RGB16_EXT, GL_RGB16_EXT, GL_RGBA16_EXT,
|
||||
GL_RGB, GL_UNSIGNED_SHORT,
|
||||
{WINED3DFMT_R16G16_UNORM, GL_RGB16_EXT, GL_RGB16_EXT, GL_RGBA16_EXT,
|
||||
GL_RGB, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_A2R10G10B10, GL_RGB10_A2, GL_RGB10_A2, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_2_10_10_10_REV,
|
||||
{WINED3DFMT_B10G10R10A2_UNORM, GL_RGB10_A2, GL_RGB10_A2, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_2_10_10_10_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_R16G16B16A16_UNORM, GL_RGBA16_EXT, GL_RGBA16_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_SHORT,
|
||||
{WINED3DFMT_R16G16B16A16_UNORM, GL_RGBA16_EXT, GL_RGBA16_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
/* Luminance */
|
||||
{WINED3DFMT_L8, GL_LUMINANCE8, GL_SLUMINANCE8_EXT, 0,
|
||||
GL_LUMINANCE, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_L8_UNORM, GL_LUMINANCE8, GL_SLUMINANCE8_EXT, 0,
|
||||
GL_LUMINANCE, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_A8L8, GL_LUMINANCE8_ALPHA8, GL_SLUMINANCE8_ALPHA8_EXT, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_L8A8_UNORM, GL_LUMINANCE8_ALPHA8, GL_SLUMINANCE8_ALPHA8_EXT, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_A4L4, GL_LUMINANCE4_ALPHA4, GL_LUMINANCE4_ALPHA4, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_L4A4_UNORM, GL_LUMINANCE4_ALPHA4, GL_LUMINANCE4_ALPHA4, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
0,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
/* Bump mapping stuff */
|
||||
{WINED3DFMT_R8G8_SNORM, GL_RGB8, GL_RGB8, 0,
|
||||
GL_BGR, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_R8G8_SNORM, GL_RGB8, GL_RGB8, 0,
|
||||
GL_BGR, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_R8G8_SNORM, GL_DSDT8_NV, GL_DSDT8_NV, 0,
|
||||
GL_DSDT_NV, GL_BYTE,
|
||||
{WINED3DFMT_R8G8_SNORM, GL_DSDT8_NV, GL_DSDT8_NV, 0,
|
||||
GL_DSDT_NV, GL_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
NV_TEXTURE_SHADER},
|
||||
{WINED3DFMT_L6V5U5, GL_RGB5, GL_RGB5, 0,
|
||||
GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
|
||||
{WINED3DFMT_R5G5_SNORM_L6_UNORM, GL_RGB5, GL_RGB5, 0,
|
||||
GL_RGB, GL_UNSIGNED_SHORT_5_6_5,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_L6V5U5, GL_DSDT8_MAG8_NV, GL_DSDT8_MAG8_NV, 0,
|
||||
GL_DSDT_MAG_NV, GL_BYTE,
|
||||
{WINED3DFMT_R5G5_SNORM_L6_UNORM, GL_DSDT8_MAG8_NV, GL_DSDT8_MAG8_NV, 0,
|
||||
GL_DSDT_MAG_NV, GL_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
NV_TEXTURE_SHADER},
|
||||
{WINED3DFMT_X8L8V8U8, GL_RGB8, GL_RGB8, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
{WINED3DFMT_R8G8_SNORM_L8X8_UNORM, GL_RGB8, GL_RGB8, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_X8L8V8U8, GL_DSDT8_MAG8_INTENSITY8_NV, GL_DSDT8_MAG8_INTENSITY8_NV, 0,
|
||||
GL_DSDT_MAG_VIB_NV, GL_UNSIGNED_INT_8_8_S8_S8_REV_NV,
|
||||
{WINED3DFMT_R8G8_SNORM_L8X8_UNORM, GL_DSDT8_MAG8_INTENSITY8_NV, GL_DSDT8_MAG8_INTENSITY8_NV, 0,
|
||||
GL_DSDT_MAG_VIB_NV, GL_UNSIGNED_INT_8_8_S8_S8_REV_NV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
NV_TEXTURE_SHADER},
|
||||
{WINED3DFMT_R8G8B8A8_SNORM, GL_RGBA8, GL_RGBA8, 0,
|
||||
GL_BGRA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_R8G8B8A8_SNORM, GL_RGBA8, GL_RGBA8, 0,
|
||||
GL_BGRA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_R8G8B8A8_SNORM, GL_SIGNED_RGBA8_NV, GL_SIGNED_RGBA8_NV, 0,
|
||||
GL_RGBA, GL_BYTE,
|
||||
{WINED3DFMT_R8G8B8A8_SNORM, GL_SIGNED_RGBA8_NV, GL_SIGNED_RGBA8_NV, 0,
|
||||
GL_RGBA, GL_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
NV_TEXTURE_SHADER},
|
||||
{WINED3DFMT_R16G16_SNORM, GL_RGB16_EXT, GL_RGB16_EXT, 0,
|
||||
GL_BGR, GL_UNSIGNED_SHORT,
|
||||
{WINED3DFMT_R16G16_SNORM, GL_RGB16_EXT, GL_RGB16_EXT, 0,
|
||||
GL_BGR, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_R16G16_SNORM, GL_SIGNED_HILO16_NV, GL_SIGNED_HILO16_NV, 0,
|
||||
GL_HILO_NV, GL_SHORT,
|
||||
{WINED3DFMT_R16G16_SNORM, GL_SIGNED_HILO16_NV, GL_SIGNED_HILO16_NV, 0,
|
||||
GL_HILO_NV, GL_SHORT,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
NV_TEXTURE_SHADER},
|
||||
/* Depth stencil formats */
|
||||
{WINED3DFMT_D16_LOCKABLE, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,
|
||||
{WINED3DFMT_D16_LOCKABLE, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_DEPTH,
|
||||
ARB_DEPTH_TEXTURE},
|
||||
{WINED3DFMT_D32, GL_DEPTH_COMPONENT32_ARB, GL_DEPTH_COMPONENT32_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
{WINED3DFMT_D32_UNORM, GL_DEPTH_COMPONENT32_ARB, GL_DEPTH_COMPONENT32_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
WINED3DFMT_FLAG_DEPTH,
|
||||
ARB_DEPTH_TEXTURE},
|
||||
{WINED3DFMT_D15S1, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,
|
||||
{WINED3DFMT_S1_UINT_D15_UNORM, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_DEPTH,
|
||||
ARB_DEPTH_TEXTURE},
|
||||
{WINED3DFMT_D15S1, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0,
|
||||
GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT,
|
||||
{WINED3DFMT_S1_UINT_D15_UNORM, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0,
|
||||
GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT,
|
||||
WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL,
|
||||
EXT_PACKED_DEPTH_STENCIL},
|
||||
{WINED3DFMT_D15S1, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0,
|
||||
GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8,
|
||||
{WINED3DFMT_S1_UINT_D15_UNORM, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0,
|
||||
GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8,
|
||||
WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL,
|
||||
ARB_FRAMEBUFFER_OBJECT},
|
||||
{WINED3DFMT_D24S8, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
{WINED3DFMT_S8_UINT_D24_UNORM, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH,
|
||||
ARB_DEPTH_TEXTURE},
|
||||
{WINED3DFMT_D24S8, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0,
|
||||
GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT,
|
||||
{WINED3DFMT_S8_UINT_D24_UNORM, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0,
|
||||
GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL,
|
||||
EXT_PACKED_DEPTH_STENCIL},
|
||||
{WINED3DFMT_D24S8, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0,
|
||||
GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8,
|
||||
{WINED3DFMT_S8_UINT_D24_UNORM, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0,
|
||||
GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL,
|
||||
ARB_FRAMEBUFFER_OBJECT},
|
||||
{WINED3DFMT_D24X8, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
{WINED3DFMT_X8D24_UNORM, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH,
|
||||
ARB_DEPTH_TEXTURE},
|
||||
{WINED3DFMT_D24X4S4, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
{WINED3DFMT_S4X4_UINT_D24_UNORM, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
WINED3DFMT_FLAG_DEPTH,
|
||||
ARB_DEPTH_TEXTURE},
|
||||
{WINED3DFMT_D24X4S4, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0,
|
||||
GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT,
|
||||
{WINED3DFMT_S4X4_UINT_D24_UNORM, GL_DEPTH24_STENCIL8_EXT, GL_DEPTH24_STENCIL8_EXT, 0,
|
||||
GL_DEPTH_STENCIL_EXT, GL_UNSIGNED_INT_24_8_EXT,
|
||||
WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL,
|
||||
EXT_PACKED_DEPTH_STENCIL},
|
||||
{WINED3DFMT_D24X4S4, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0,
|
||||
GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8,
|
||||
{WINED3DFMT_S4X4_UINT_D24_UNORM, GL_DEPTH24_STENCIL8, GL_DEPTH24_STENCIL8, 0,
|
||||
GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8,
|
||||
WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL,
|
||||
ARB_FRAMEBUFFER_OBJECT},
|
||||
{WINED3DFMT_D16_UNORM, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,
|
||||
{WINED3DFMT_D16_UNORM, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH,
|
||||
ARB_DEPTH_TEXTURE},
|
||||
{WINED3DFMT_L16, GL_LUMINANCE16_EXT, GL_LUMINANCE16_EXT, 0,
|
||||
GL_LUMINANCE, GL_UNSIGNED_SHORT,
|
||||
{WINED3DFMT_L16_UNORM, GL_LUMINANCE16_EXT, GL_LUMINANCE16_EXT, 0,
|
||||
GL_LUMINANCE, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING,
|
||||
WINED3D_GL_EXT_NONE},
|
||||
{WINED3DFMT_D32F_LOCKABLE, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT32F, 0,
|
||||
GL_DEPTH_COMPONENT, GL_FLOAT,
|
||||
{WINED3DFMT_D32_FLOAT, GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT32F, 0,
|
||||
GL_DEPTH_COMPONENT, GL_FLOAT,
|
||||
WINED3DFMT_FLAG_DEPTH,
|
||||
ARB_DEPTH_BUFFER_FLOAT},
|
||||
{WINED3DFMT_D24FS8, GL_DEPTH32F_STENCIL8, GL_DEPTH32F_STENCIL8, 0,
|
||||
GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV,
|
||||
{WINED3DFMT_S8_UINT_D24_FLOAT, GL_DEPTH32F_STENCIL8, GL_DEPTH32F_STENCIL8, 0,
|
||||
GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV,
|
||||
WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL,
|
||||
ARB_DEPTH_BUFFER_FLOAT},
|
||||
/* Vendor-specific formats */
|
||||
{WINED3DFMT_ATI2N, GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI, GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_ATI2N, GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI, GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
0,
|
||||
ATI_TEXTURE_COMPRESSION_3DC},
|
||||
{WINED3DFMT_ATI2N, GL_COMPRESSED_RED_GREEN_RGTC2_EXT, GL_COMPRESSED_RED_GREEN_RGTC2_EXT, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
{WINED3DFMT_ATI2N, GL_COMPRESSED_RED_GREEN_RGTC2_EXT, GL_COMPRESSED_RED_GREEN_RGTC2_EXT, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
0,
|
||||
EXT_TEXTURE_COMPRESSION_RGTC},
|
||||
};
|
||||
@ -1014,10 +1014,10 @@ static void apply_format_fixups(struct wined3d_gl_info *gl_info)
|
||||
/* If GL_NV_texture_shader is not supported, those formats are converted, incompatibly
|
||||
* with each other
|
||||
*/
|
||||
idx = getFmtIdx(WINED3DFMT_L6V5U5);
|
||||
idx = getFmtIdx(WINED3DFMT_R5G5_SNORM_L6_UNORM);
|
||||
gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
|
||||
1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Z, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE);
|
||||
idx = getFmtIdx(WINED3DFMT_X8L8V8U8);
|
||||
idx = getFmtIdx(WINED3DFMT_R8G8_SNORM_L8X8_UNORM);
|
||||
gl_info->gl_formats[idx].color_fixup = create_color_fixup_desc(
|
||||
1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_Z, 0, CHANNEL_SOURCE_W);
|
||||
idx = getFmtIdx(WINED3DFMT_R8G8B8A8_SNORM);
|
||||
@ -1061,7 +1061,7 @@ static void apply_format_fixups(struct wined3d_gl_info *gl_info)
|
||||
|
||||
if (GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA))
|
||||
{
|
||||
idx = getFmtIdx(WINED3DFMT_A8R8G8B8);
|
||||
idx = getFmtIdx(WINED3DFMT_B8G8R8A8_UNORM);
|
||||
gl_info->gl_formats[idx].gl_vtx_format = GL_BGRA;
|
||||
}
|
||||
|
||||
@ -1162,27 +1162,23 @@ const char* debug_d3dformat(WINED3DFORMAT fmt) {
|
||||
switch (fmt) {
|
||||
#define FMT_TO_STR(fmt) case fmt: return #fmt
|
||||
FMT_TO_STR(WINED3DFMT_UNKNOWN);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8B8);
|
||||
FMT_TO_STR(WINED3DFMT_A8R8G8B8);
|
||||
FMT_TO_STR(WINED3DFMT_X8R8G8B8);
|
||||
FMT_TO_STR(WINED3DFMT_R5G6B5);
|
||||
FMT_TO_STR(WINED3DFMT_X1R5G5B5);
|
||||
FMT_TO_STR(WINED3DFMT_A1R5G5B5);
|
||||
FMT_TO_STR(WINED3DFMT_A4R4G4B4);
|
||||
FMT_TO_STR(WINED3DFMT_R3G3B2);
|
||||
FMT_TO_STR(WINED3DFMT_A8R3G3B2);
|
||||
FMT_TO_STR(WINED3DFMT_X4R4G4B4);
|
||||
FMT_TO_STR(WINED3DFMT_X8B8G8R8);
|
||||
FMT_TO_STR(WINED3DFMT_A2R10G10B10);
|
||||
FMT_TO_STR(WINED3DFMT_A8P8);
|
||||
FMT_TO_STR(WINED3DFMT_P8);
|
||||
FMT_TO_STR(WINED3DFMT_L8);
|
||||
FMT_TO_STR(WINED3DFMT_A8L8);
|
||||
FMT_TO_STR(WINED3DFMT_A4L4);
|
||||
FMT_TO_STR(WINED3DFMT_L6V5U5);
|
||||
FMT_TO_STR(WINED3DFMT_X8L8V8U8);
|
||||
FMT_TO_STR(WINED3DFMT_W11V11U10);
|
||||
FMT_TO_STR(WINED3DFMT_A2W10V10U10);
|
||||
FMT_TO_STR(WINED3DFMT_B8G8R8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_B5G5R5X1_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_B4G4R4A4_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_B2G3R3_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_B2G3R3A8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_B4G4R4X4_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8B8X8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_B10G10R10A2_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_P8_UINT_A8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_P8_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_L8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_L8A8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_L4A4_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R5G5_SNORM_L6_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8_SNORM_L8X8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R10G11B11_SNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R10G10B10_SNORM_A2_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_UYVY);
|
||||
FMT_TO_STR(WINED3DFMT_YUY2);
|
||||
FMT_TO_STR(WINED3DFMT_YV12);
|
||||
@ -1195,16 +1191,15 @@ const char* debug_d3dformat(WINED3DFORMAT fmt) {
|
||||
FMT_TO_STR(WINED3DFMT_G8R8_G8B8);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8_B8G8);
|
||||
FMT_TO_STR(WINED3DFMT_D16_LOCKABLE);
|
||||
FMT_TO_STR(WINED3DFMT_D32);
|
||||
FMT_TO_STR(WINED3DFMT_D15S1);
|
||||
FMT_TO_STR(WINED3DFMT_D24S8);
|
||||
FMT_TO_STR(WINED3DFMT_D24X8);
|
||||
FMT_TO_STR(WINED3DFMT_D24X4S4);
|
||||
FMT_TO_STR(WINED3DFMT_L16);
|
||||
FMT_TO_STR(WINED3DFMT_D32F_LOCKABLE);
|
||||
FMT_TO_STR(WINED3DFMT_D24FS8);
|
||||
FMT_TO_STR(WINED3DFMT_D32_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_S1_UINT_D15_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_S8_UINT_D24_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_X8D24_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_S4X4_UINT_D24_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_L16_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_S8_UINT_D24_FLOAT);
|
||||
FMT_TO_STR(WINED3DFMT_VERTEXDATA);
|
||||
FMT_TO_STR(WINED3DFMT_CxV8U8);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8_SNORM_Cx);
|
||||
FMT_TO_STR(WINED3DFMT_ATI2N);
|
||||
FMT_TO_STR(WINED3DFMT_NVHU);
|
||||
FMT_TO_STR(WINED3DFMT_NVHS);
|
||||
@ -2052,19 +2047,19 @@ BOOL getColorBits(const struct GlPixelFormatDesc *format_desc,
|
||||
TRACE("fmt: %s\n", debug_d3dformat(format_desc->format));
|
||||
switch(format_desc->format)
|
||||
{
|
||||
case WINED3DFMT_X8R8G8B8:
|
||||
case WINED3DFMT_R8G8B8:
|
||||
case WINED3DFMT_A8R8G8B8:
|
||||
case WINED3DFMT_B8G8R8X8_UNORM:
|
||||
case WINED3DFMT_B8G8R8_UNORM:
|
||||
case WINED3DFMT_B8G8R8A8_UNORM:
|
||||
case WINED3DFMT_R8G8B8A8_UNORM:
|
||||
case WINED3DFMT_A2R10G10B10:
|
||||
case WINED3DFMT_X1R5G5B5:
|
||||
case WINED3DFMT_A1R5G5B5:
|
||||
case WINED3DFMT_R5G6B5:
|
||||
case WINED3DFMT_X4R4G4B4:
|
||||
case WINED3DFMT_A4R4G4B4:
|
||||
case WINED3DFMT_R3G3B2:
|
||||
case WINED3DFMT_A8P8:
|
||||
case WINED3DFMT_P8:
|
||||
case WINED3DFMT_B10G10R10A2_UNORM:
|
||||
case WINED3DFMT_B5G5R5X1_UNORM:
|
||||
case WINED3DFMT_B5G5R5A1_UNORM:
|
||||
case WINED3DFMT_B5G6R5_UNORM:
|
||||
case WINED3DFMT_B4G4R4X4_UNORM:
|
||||
case WINED3DFMT_B4G4R4A4_UNORM:
|
||||
case WINED3DFMT_B2G3R3_UNORM:
|
||||
case WINED3DFMT_P8_UINT_A8_UNORM:
|
||||
case WINED3DFMT_P8_UINT:
|
||||
break;
|
||||
default:
|
||||
ERR("Unsupported format: %s\n", debug_d3dformat(format_desc->format));
|
||||
@ -2090,13 +2085,13 @@ BOOL getDepthStencilBits(const struct GlPixelFormatDesc *format_desc, short *dep
|
||||
{
|
||||
case WINED3DFMT_D16_LOCKABLE:
|
||||
case WINED3DFMT_D16_UNORM:
|
||||
case WINED3DFMT_D15S1:
|
||||
case WINED3DFMT_D24X8:
|
||||
case WINED3DFMT_D24X4S4:
|
||||
case WINED3DFMT_D24S8:
|
||||
case WINED3DFMT_D24FS8:
|
||||
case WINED3DFMT_D32:
|
||||
case WINED3DFMT_D32F_LOCKABLE:
|
||||
case WINED3DFMT_S1_UINT_D15_UNORM:
|
||||
case WINED3DFMT_X8D24_UNORM:
|
||||
case WINED3DFMT_S4X4_UINT_D24_UNORM:
|
||||
case WINED3DFMT_S8_UINT_D24_UNORM:
|
||||
case WINED3DFMT_S8_UINT_D24_FLOAT:
|
||||
case WINED3DFMT_D32_UNORM:
|
||||
case WINED3DFMT_D32_FLOAT:
|
||||
break;
|
||||
default:
|
||||
FIXME("Unsupported stencil format: %s\n", debug_d3dformat(format_desc->format));
|
||||
@ -2114,11 +2109,11 @@ BOOL getDepthStencilBits(const struct GlPixelFormatDesc *format_desc, short *dep
|
||||
/* DirectDraw stuff */
|
||||
WINED3DFORMAT pixelformat_for_depth(DWORD depth) {
|
||||
switch(depth) {
|
||||
case 8: return WINED3DFMT_P8;
|
||||
case 15: return WINED3DFMT_X1R5G5B5;
|
||||
case 16: return WINED3DFMT_R5G6B5;
|
||||
case 24: return WINED3DFMT_X8R8G8B8; /* Robots needs 24bit to be X8R8G8B8 */
|
||||
case 32: return WINED3DFMT_X8R8G8B8; /* EVE online and the Fur demo need 32bit AdapterDisplayMode to return X8R8G8B8 */
|
||||
case 8: return WINED3DFMT_P8_UINT;
|
||||
case 15: return WINED3DFMT_B5G5R5X1_UNORM;
|
||||
case 16: return WINED3DFMT_B5G6R5_UNORM;
|
||||
case 24: return WINED3DFMT_B8G8R8X8_UNORM; /* Robots needs 24bit to be WINED3DFMT_B8G8R8X8_UNORM */
|
||||
case 32: return WINED3DFMT_B8G8R8X8_UNORM; /* EVE online and the Fur demo need 32bit AdapterDisplayMode to return WINED3DFMT_B8G8R8X8_UNORM */
|
||||
default: return WINED3DFMT_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
* Copyright 2004 Jason Edmeades
|
||||
* Copyright 2004 Christian Costa
|
||||
* Copyright 2005 Oliver Stieber
|
||||
* Copyright 2009 Henri Verbeet for CodeWeavers
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
@ -130,7 +131,7 @@ static BOOL declaration_element_valid_ffp(const WINED3DVERTEXELEMENT *element)
|
||||
case WINED3DFMT_R32G32_FLOAT:
|
||||
case WINED3DFMT_R32G32B32_FLOAT:
|
||||
case WINED3DFMT_R32G32B32A32_FLOAT:
|
||||
case WINED3DFMT_A8R8G8B8:
|
||||
case WINED3DFMT_B8G8R8A8_UNORM:
|
||||
case WINED3DFMT_R8G8B8A8_UINT:
|
||||
case WINED3DFMT_R16G16_SINT:
|
||||
case WINED3DFMT_R16G16B16A16_SINT:
|
||||
@ -174,7 +175,7 @@ static BOOL declaration_element_valid_ffp(const WINED3DVERTEXELEMENT *element)
|
||||
{
|
||||
case WINED3DFMT_R32G32B32_FLOAT:
|
||||
case WINED3DFMT_R32G32B32A32_FLOAT:
|
||||
case WINED3DFMT_A8R8G8B8:
|
||||
case WINED3DFMT_B8G8R8A8_UNORM:
|
||||
case WINED3DFMT_R8G8B8A8_UINT:
|
||||
case WINED3DFMT_R16G16B16A16_SINT:
|
||||
case WINED3DFMT_R8G8B8A8_UNORM:
|
||||
|
@ -132,39 +132,33 @@ typedef enum _WINED3DDEGREETYPE
|
||||
typedef enum _WINED3DFORMAT
|
||||
{
|
||||
WINED3DFMT_UNKNOWN,
|
||||
WINED3DFMT_R8G8B8,
|
||||
WINED3DFMT_A8R8G8B8,
|
||||
WINED3DFMT_X8R8G8B8,
|
||||
WINED3DFMT_R5G6B5,
|
||||
WINED3DFMT_X1R5G5B5,
|
||||
WINED3DFMT_A1R5G5B5,
|
||||
WINED3DFMT_A4R4G4B4,
|
||||
WINED3DFMT_R3G3B2,
|
||||
WINED3DFMT_A8R3G3B2,
|
||||
WINED3DFMT_X4R4G4B4,
|
||||
WINED3DFMT_X8B8G8R8,
|
||||
WINED3DFMT_A2R10G10B10,
|
||||
WINED3DFMT_A8P8,
|
||||
WINED3DFMT_P8,
|
||||
WINED3DFMT_L8,
|
||||
WINED3DFMT_A8L8,
|
||||
WINED3DFMT_A4L4,
|
||||
WINED3DFMT_L6V5U5,
|
||||
WINED3DFMT_X8L8V8U8,
|
||||
WINED3DFMT_W11V11U10,
|
||||
WINED3DFMT_A2W10V10U10,
|
||||
WINED3DFMT_B8G8R8_UNORM,
|
||||
WINED3DFMT_B5G5R5X1_UNORM,
|
||||
WINED3DFMT_B4G4R4A4_UNORM,
|
||||
WINED3DFMT_B2G3R3_UNORM,
|
||||
WINED3DFMT_B2G3R3A8_UNORM,
|
||||
WINED3DFMT_B4G4R4X4_UNORM,
|
||||
WINED3DFMT_R8G8B8X8_UNORM,
|
||||
WINED3DFMT_B10G10R10A2_UNORM,
|
||||
WINED3DFMT_P8_UINT_A8_UNORM,
|
||||
WINED3DFMT_P8_UINT,
|
||||
WINED3DFMT_L8_UNORM,
|
||||
WINED3DFMT_L8A8_UNORM,
|
||||
WINED3DFMT_L4A4_UNORM,
|
||||
WINED3DFMT_R5G5_SNORM_L6_UNORM,
|
||||
WINED3DFMT_R8G8_SNORM_L8X8_UNORM,
|
||||
WINED3DFMT_R10G11B11_SNORM,
|
||||
WINED3DFMT_R10G10B10_SNORM_A2_UNORM,
|
||||
WINED3DFMT_D16_LOCKABLE,
|
||||
WINED3DFMT_D32,
|
||||
WINED3DFMT_D15S1,
|
||||
WINED3DFMT_D24S8,
|
||||
WINED3DFMT_D24X8,
|
||||
WINED3DFMT_D24X4S4,
|
||||
WINED3DFMT_L16,
|
||||
WINED3DFMT_D32F_LOCKABLE,
|
||||
WINED3DFMT_D24FS8,
|
||||
WINED3DFMT_D32_UNORM,
|
||||
WINED3DFMT_S1_UINT_D15_UNORM,
|
||||
WINED3DFMT_S8_UINT_D24_UNORM,
|
||||
WINED3DFMT_X8D24_UNORM,
|
||||
WINED3DFMT_S4X4_UINT_D24_UNORM,
|
||||
WINED3DFMT_L16_UNORM,
|
||||
WINED3DFMT_S8_UINT_D24_FLOAT,
|
||||
WINED3DFMT_VERTEXDATA,
|
||||
WINED3DFMT_CxV8U8,
|
||||
/* DXGI formats */
|
||||
WINED3DFMT_R8G8_SNORM_Cx,
|
||||
WINED3DFMT_R32G32B32A32_TYPELESS,
|
||||
WINED3DFMT_R32G32B32A32_FLOAT,
|
||||
WINED3DFMT_R32G32B32A32_UINT,
|
||||
|
Loading…
Reference in New Issue
Block a user