mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
wined3d: Add DXGI formats to WINED3DFORMAT.
This commit is contained in:
parent
61a9efc4b9
commit
8cefc47d81
@ -54,21 +54,21 @@ D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
|
||||
case WINED3DFMT_A1R5G5B5: return D3DFMT_A1R5G5B5;
|
||||
case WINED3DFMT_A4R4G4B4: return D3DFMT_A4R4G4B4;
|
||||
case WINED3DFMT_R3G3B2: return D3DFMT_R3G3B2;
|
||||
case WINED3DFMT_A8: return D3DFMT_A8;
|
||||
case WINED3DFMT_A8_UNORM: return D3DFMT_A8;
|
||||
case WINED3DFMT_A8R3G3B2: return D3DFMT_A8R3G3B2;
|
||||
case WINED3DFMT_X4R4G4B4: return D3DFMT_X4R4G4B4;
|
||||
case WINED3DFMT_A2B10G10R10: return D3DFMT_A2B10G10R10;
|
||||
case WINED3DFMT_G16R16: return D3DFMT_G16R16;
|
||||
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_V8U8: return D3DFMT_V8U8;
|
||||
case WINED3DFMT_R8G8_SNORM: return D3DFMT_V8U8;
|
||||
case WINED3DFMT_L6V5U5: return D3DFMT_L6V5U5;
|
||||
case WINED3DFMT_X8L8V8U8: return D3DFMT_X8L8V8U8;
|
||||
case WINED3DFMT_Q8W8V8U8: return D3DFMT_Q8W8V8U8;
|
||||
case WINED3DFMT_V16U16: return D3DFMT_V16U16;
|
||||
case WINED3DFMT_R8G8B8A8_SNORM: return D3DFMT_Q8W8V8U8;
|
||||
case WINED3DFMT_R16G16_SNORM: return D3DFMT_V16U16;
|
||||
case WINED3DFMT_A2W10V10U10: return D3DFMT_A2W10V10U10;
|
||||
case WINED3DFMT_D16_LOCKABLE: return D3DFMT_D16_LOCKABLE;
|
||||
case WINED3DFMT_D32: return D3DFMT_D32;
|
||||
@ -76,10 +76,10 @@ D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
|
||||
case WINED3DFMT_D24S8: return D3DFMT_D24S8;
|
||||
case WINED3DFMT_D24X8: return D3DFMT_D24X8;
|
||||
case WINED3DFMT_D24X4S4: return D3DFMT_D24X4S4;
|
||||
case WINED3DFMT_D16: return D3DFMT_D16;
|
||||
case WINED3DFMT_D16_UNORM: return D3DFMT_D16;
|
||||
case WINED3DFMT_VERTEXDATA: return D3DFMT_VERTEXDATA;
|
||||
case WINED3DFMT_INDEX16: return D3DFMT_INDEX16;
|
||||
case WINED3DFMT_INDEX32: return D3DFMT_INDEX32;
|
||||
case WINED3DFMT_R16_UINT: return D3DFMT_INDEX16;
|
||||
case WINED3DFMT_R32_UINT: return D3DFMT_INDEX32;
|
||||
default:
|
||||
FIXME("Unhandled WINED3DFORMAT %#x\n", format);
|
||||
return D3DFMT_UNKNOWN;
|
||||
@ -104,21 +104,21 @@ WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format)
|
||||
case D3DFMT_A1R5G5B5: return WINED3DFMT_A1R5G5B5;
|
||||
case D3DFMT_A4R4G4B4: return WINED3DFMT_A4R4G4B4;
|
||||
case D3DFMT_R3G3B2: return WINED3DFMT_R3G3B2;
|
||||
case D3DFMT_A8: return WINED3DFMT_A8;
|
||||
case D3DFMT_A8: return WINED3DFMT_A8_UNORM;
|
||||
case D3DFMT_A8R3G3B2: return WINED3DFMT_A8R3G3B2;
|
||||
case D3DFMT_X4R4G4B4: return WINED3DFMT_X4R4G4B4;
|
||||
case D3DFMT_A2B10G10R10: return WINED3DFMT_A2B10G10R10;
|
||||
case D3DFMT_G16R16: return WINED3DFMT_G16R16;
|
||||
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_V8U8: return WINED3DFMT_V8U8;
|
||||
case D3DFMT_V8U8: return WINED3DFMT_R8G8_SNORM;
|
||||
case D3DFMT_L6V5U5: return WINED3DFMT_L6V5U5;
|
||||
case D3DFMT_X8L8V8U8: return WINED3DFMT_X8L8V8U8;
|
||||
case D3DFMT_Q8W8V8U8: return WINED3DFMT_Q8W8V8U8;
|
||||
case D3DFMT_V16U16: return WINED3DFMT_V16U16;
|
||||
case D3DFMT_Q8W8V8U8: return WINED3DFMT_R8G8B8A8_SNORM;
|
||||
case D3DFMT_V16U16: return WINED3DFMT_R16G16_SNORM;
|
||||
case D3DFMT_A2W10V10U10: return WINED3DFMT_A2W10V10U10;
|
||||
case D3DFMT_D16_LOCKABLE: return WINED3DFMT_D16_LOCKABLE;
|
||||
case D3DFMT_D32: return WINED3DFMT_D32;
|
||||
@ -126,10 +126,10 @@ WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format)
|
||||
case D3DFMT_D24S8: return WINED3DFMT_D24S8;
|
||||
case D3DFMT_D24X8: return WINED3DFMT_D24X8;
|
||||
case D3DFMT_D24X4S4: return WINED3DFMT_D24X4S4;
|
||||
case D3DFMT_D16: return WINED3DFMT_D16;
|
||||
case D3DFMT_D16: return WINED3DFMT_D16_UNORM;
|
||||
case D3DFMT_VERTEXDATA: return WINED3DFMT_VERTEXDATA;
|
||||
case D3DFMT_INDEX16: return WINED3DFMT_INDEX16;
|
||||
case D3DFMT_INDEX32: return WINED3DFMT_INDEX32;
|
||||
case D3DFMT_INDEX16: return WINED3DFMT_R16_UINT;
|
||||
case D3DFMT_INDEX32: return WINED3DFMT_R32_UINT;
|
||||
default:
|
||||
FIXME("Unhandled D3DFORMAT %#x\n", format);
|
||||
return WINED3DFMT_UNKNOWN;
|
||||
|
@ -43,25 +43,25 @@ D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
|
||||
case WINED3DFMT_A1R5G5B5: return D3DFMT_A1R5G5B5;
|
||||
case WINED3DFMT_A4R4G4B4: return D3DFMT_A4R4G4B4;
|
||||
case WINED3DFMT_R3G3B2: return D3DFMT_R3G3B2;
|
||||
case WINED3DFMT_A8: return D3DFMT_A8;
|
||||
case WINED3DFMT_A8_UNORM: return D3DFMT_A8;
|
||||
case WINED3DFMT_A8R3G3B2: return D3DFMT_A8R3G3B2;
|
||||
case WINED3DFMT_X4R4G4B4: return D3DFMT_X4R4G4B4;
|
||||
case WINED3DFMT_A2B10G10R10: return D3DFMT_A2B10G10R10;
|
||||
case WINED3DFMT_A8B8G8R8: return D3DFMT_A8B8G8R8;
|
||||
case WINED3DFMT_R10G10B10A2_UNORM: return D3DFMT_A2B10G10R10;
|
||||
case WINED3DFMT_R8G8B8A8_UNORM: return D3DFMT_A8B8G8R8;
|
||||
case WINED3DFMT_X8B8G8R8: return D3DFMT_X8B8G8R8;
|
||||
case WINED3DFMT_G16R16: return D3DFMT_G16R16;
|
||||
case WINED3DFMT_R16G16_UNORM: return D3DFMT_G16R16;
|
||||
case WINED3DFMT_A2R10G10B10: return D3DFMT_A2R10G10B10;
|
||||
case WINED3DFMT_A16B16G16R16: return D3DFMT_A16B16G16R16;
|
||||
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_V8U8: return D3DFMT_V8U8;
|
||||
case WINED3DFMT_R8G8_SNORM: return D3DFMT_V8U8;
|
||||
case WINED3DFMT_L6V5U5: return D3DFMT_L6V5U5;
|
||||
case WINED3DFMT_X8L8V8U8: return D3DFMT_X8L8V8U8;
|
||||
case WINED3DFMT_Q8W8V8U8: return D3DFMT_Q8W8V8U8;
|
||||
case WINED3DFMT_V16U16: return D3DFMT_V16U16;
|
||||
case WINED3DFMT_R8G8B8A8_SNORM: return D3DFMT_Q8W8V8U8;
|
||||
case WINED3DFMT_R16G16_SNORM: return D3DFMT_V16U16;
|
||||
case WINED3DFMT_A2W10V10U10: return D3DFMT_A2W10V10U10;
|
||||
case WINED3DFMT_D16_LOCKABLE: return D3DFMT_D16_LOCKABLE;
|
||||
case WINED3DFMT_D32: return D3DFMT_D32;
|
||||
@ -69,20 +69,20 @@ D3DFORMAT d3dformat_from_wined3dformat(WINED3DFORMAT format)
|
||||
case WINED3DFMT_D24S8: return D3DFMT_D24S8;
|
||||
case WINED3DFMT_D24X8: return D3DFMT_D24X8;
|
||||
case WINED3DFMT_D24X4S4: return D3DFMT_D24X4S4;
|
||||
case WINED3DFMT_D16: return D3DFMT_D16;
|
||||
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_VERTEXDATA: return D3DFMT_VERTEXDATA;
|
||||
case WINED3DFMT_INDEX16: return D3DFMT_INDEX16;
|
||||
case WINED3DFMT_INDEX32: return D3DFMT_INDEX32;
|
||||
case WINED3DFMT_Q16W16V16U16: return D3DFMT_Q16W16V16U16;
|
||||
case WINED3DFMT_R16F: return D3DFMT_R16F;
|
||||
case WINED3DFMT_G16R16F: return D3DFMT_G16R16F;
|
||||
case WINED3DFMT_A16B16G16R16F: return D3DFMT_A16B16G16R16F;
|
||||
case WINED3DFMT_R32F: return D3DFMT_R32F;
|
||||
case WINED3DFMT_G32R32F: return D3DFMT_G32R32F;
|
||||
case WINED3DFMT_A32B32G32R32F: return D3DFMT_A32B32G32R32F;
|
||||
case WINED3DFMT_R16_UINT: return D3DFMT_INDEX16;
|
||||
case WINED3DFMT_R32_UINT: return D3DFMT_INDEX32;
|
||||
case WINED3DFMT_R16G16B16A16_SNORM: return D3DFMT_Q16W16V16U16;
|
||||
case WINED3DFMT_R16_FLOAT: return D3DFMT_R16F;
|
||||
case WINED3DFMT_R16G16_FLOAT: return D3DFMT_G16R16F;
|
||||
case WINED3DFMT_R16G16B16A16_FLOAT: return D3DFMT_A16B16G16R16F;
|
||||
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;
|
||||
default:
|
||||
FIXME("Unhandled WINED3DFORMAT %#x\n", format);
|
||||
@ -108,25 +108,25 @@ WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format)
|
||||
case D3DFMT_A1R5G5B5: return WINED3DFMT_A1R5G5B5;
|
||||
case D3DFMT_A4R4G4B4: return WINED3DFMT_A4R4G4B4;
|
||||
case D3DFMT_R3G3B2: return WINED3DFMT_R3G3B2;
|
||||
case D3DFMT_A8: return WINED3DFMT_A8;
|
||||
case D3DFMT_A8: return WINED3DFMT_A8_UNORM;
|
||||
case D3DFMT_A8R3G3B2: return WINED3DFMT_A8R3G3B2;
|
||||
case D3DFMT_X4R4G4B4: return WINED3DFMT_X4R4G4B4;
|
||||
case D3DFMT_A2B10G10R10: return WINED3DFMT_A2B10G10R10;
|
||||
case D3DFMT_A8B8G8R8: return WINED3DFMT_A8B8G8R8;
|
||||
case D3DFMT_A2B10G10R10: return WINED3DFMT_R10G10B10A2_UNORM;
|
||||
case D3DFMT_A8B8G8R8: return WINED3DFMT_R8G8B8A8_UNORM;
|
||||
case D3DFMT_X8B8G8R8: return WINED3DFMT_X8B8G8R8;
|
||||
case D3DFMT_G16R16: return WINED3DFMT_G16R16;
|
||||
case D3DFMT_G16R16: return WINED3DFMT_R16G16_UNORM;
|
||||
case D3DFMT_A2R10G10B10: return WINED3DFMT_A2R10G10B10;
|
||||
case D3DFMT_A16B16G16R16: return WINED3DFMT_A16B16G16R16;
|
||||
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_V8U8: return WINED3DFMT_V8U8;
|
||||
case D3DFMT_V8U8: return WINED3DFMT_R8G8_SNORM;
|
||||
case D3DFMT_L6V5U5: return WINED3DFMT_L6V5U5;
|
||||
case D3DFMT_X8L8V8U8: return WINED3DFMT_X8L8V8U8;
|
||||
case D3DFMT_Q8W8V8U8: return WINED3DFMT_Q8W8V8U8;
|
||||
case D3DFMT_V16U16: return WINED3DFMT_V16U16;
|
||||
case D3DFMT_Q8W8V8U8: return WINED3DFMT_R8G8B8A8_SNORM;
|
||||
case D3DFMT_V16U16: return WINED3DFMT_R16G16_SNORM;
|
||||
case D3DFMT_A2W10V10U10: return WINED3DFMT_A2W10V10U10;
|
||||
case D3DFMT_D16_LOCKABLE: return WINED3DFMT_D16_LOCKABLE;
|
||||
case D3DFMT_D32: return WINED3DFMT_D32;
|
||||
@ -134,20 +134,20 @@ WINED3DFORMAT wined3dformat_from_d3dformat(D3DFORMAT format)
|
||||
case D3DFMT_D24S8: return WINED3DFMT_D24S8;
|
||||
case D3DFMT_D24X8: return WINED3DFMT_D24X8;
|
||||
case D3DFMT_D24X4S4: return WINED3DFMT_D24X4S4;
|
||||
case D3DFMT_D16: return WINED3DFMT_D16;
|
||||
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_VERTEXDATA: return WINED3DFMT_VERTEXDATA;
|
||||
case D3DFMT_INDEX16: return WINED3DFMT_INDEX16;
|
||||
case D3DFMT_INDEX32: return WINED3DFMT_INDEX32;
|
||||
case D3DFMT_Q16W16V16U16: return WINED3DFMT_Q16W16V16U16;
|
||||
case D3DFMT_R16F: return WINED3DFMT_R16F;
|
||||
case D3DFMT_G16R16F: return WINED3DFMT_G16R16F;
|
||||
case D3DFMT_A16B16G16R16F: return WINED3DFMT_A16B16G16R16F;
|
||||
case D3DFMT_R32F: return WINED3DFMT_R32F;
|
||||
case D3DFMT_G32R32F: return WINED3DFMT_G32R32F;
|
||||
case D3DFMT_A32B32G32R32F: return WINED3DFMT_A32B32G32R32F;
|
||||
case D3DFMT_INDEX16: return WINED3DFMT_R16_UINT;
|
||||
case D3DFMT_INDEX32: return WINED3DFMT_R32_UINT;
|
||||
case D3DFMT_Q16W16V16U16: return WINED3DFMT_R16G16B16A16_SNORM;
|
||||
case D3DFMT_R16F: return WINED3DFMT_R16_FLOAT;
|
||||
case D3DFMT_G16R16F: return WINED3DFMT_R16G16_FLOAT;
|
||||
case D3DFMT_A16B16G16R16F: return WINED3DFMT_R16G16B16A16_FLOAT;
|
||||
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;
|
||||
default:
|
||||
FIXME("Unhandled D3DFORMAT %#x\n", format);
|
||||
|
@ -1339,8 +1339,8 @@ IDirectDrawImpl_EnumDisplayModes(IDirectDraw7 *iface,
|
||||
WINED3DFMT_R3G3B2,
|
||||
WINED3DFMT_A8R3G3B2,
|
||||
WINED3DFMT_X4R4G4B4,
|
||||
WINED3DFMT_A2B10G10R10,
|
||||
WINED3DFMT_A8B8G8R8,
|
||||
WINED3DFMT_R10G10B10A2_UNORM,
|
||||
WINED3DFMT_R8G8B8A8_UNORM,
|
||||
WINED3DFMT_X8B8G8R8,
|
||||
WINED3DFMT_A2R10G10B10,
|
||||
WINED3DFMT_A8P8,
|
||||
@ -2484,7 +2484,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
|
||||
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, WINED3DFMT_D15S1);
|
||||
break;
|
||||
case 16:
|
||||
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, WINED3DFMT_D16);
|
||||
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, WINED3DFMT_D16_UNORM);
|
||||
break;
|
||||
case 24:
|
||||
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, WINED3DFMT_D24X8);
|
||||
@ -3045,7 +3045,7 @@ IDirectDrawImpl_AttachD3DDevice(IDirectDrawImpl *This,
|
||||
localParameters.hDeviceWindow = window;
|
||||
localParameters.Windowed = !(This->cooperative_level & DDSCL_FULLSCREEN);
|
||||
localParameters.EnableAutoDepthStencil = TRUE;
|
||||
localParameters.AutoDepthStencilFormat = WINED3DFMT_D16;
|
||||
localParameters.AutoDepthStencilFormat = WINED3DFMT_D16_UNORM;
|
||||
localParameters.Flags = 0;
|
||||
localParameters.FullScreen_RefreshRateInHz = WINED3DPRESENT_RATE_DEFAULT; /* Default rate: It's already set */
|
||||
localParameters.PresentationInterval = WINED3DPRESENT_INTERVAL_DEFAULT;
|
||||
|
@ -1166,11 +1166,11 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
|
||||
};
|
||||
|
||||
WINED3DFORMAT BumpFormatList[] = {
|
||||
WINED3DFMT_V8U8,
|
||||
WINED3DFMT_R8G8_SNORM,
|
||||
WINED3DFMT_L6V5U5,
|
||||
WINED3DFMT_X8L8V8U8,
|
||||
WINED3DFMT_Q8W8V8U8,
|
||||
WINED3DFMT_V16U16,
|
||||
WINED3DFMT_R8G8B8A8_SNORM,
|
||||
WINED3DFMT_R16G16_SNORM,
|
||||
WINED3DFMT_W11V11U10,
|
||||
WINED3DFMT_A2W10V10U10
|
||||
};
|
||||
@ -3673,15 +3673,9 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitive(IDirect3DDevice7 *iface,
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = IWineD3DDevice_DrawIndexedPrimitiveUP(This->wineD3DDevice,
|
||||
PrimitiveType,
|
||||
0 /* MinVertexIndex */,
|
||||
VertexCount /* UINT NumVertexIndex */,
|
||||
PrimitiveCount,
|
||||
Indices,
|
||||
WINED3DFMT_INDEX16,
|
||||
Vertices,
|
||||
get_flexible_vertex_size(VertexType));
|
||||
hr = IWineD3DDevice_DrawIndexedPrimitiveUP(This->wineD3DDevice, PrimitiveType, 0 /* MinVertexIndex */,
|
||||
VertexCount /* UINT NumVertexIndex */, PrimitiveCount, Indices, WINED3DFMT_R16_UINT, Vertices,
|
||||
get_flexible_vertex_size(VertexType));
|
||||
LeaveCriticalSection(&ddraw_cs);
|
||||
return hr;
|
||||
}
|
||||
@ -4152,13 +4146,8 @@ IDirect3DDeviceImpl_7_DrawIndexedPrimitiveStrided(IDirect3DDevice7 *iface,
|
||||
|
||||
/* WineD3D doesn't need the FVF here */
|
||||
EnterCriticalSection(&ddraw_cs);
|
||||
hr = IWineD3DDevice_DrawIndexedPrimitiveStrided(This->wineD3DDevice,
|
||||
PrimitiveType,
|
||||
PrimitiveCount,
|
||||
&WineD3DStrided,
|
||||
VertexCount,
|
||||
Indices,
|
||||
WINED3DFMT_INDEX16);
|
||||
hr = IWineD3DDevice_DrawIndexedPrimitiveStrided(This->wineD3DDevice, PrimitiveType,
|
||||
PrimitiveCount, &WineD3DStrided, VertexCount, Indices, WINED3DFMT_R16_UINT);
|
||||
LeaveCriticalSection(&ddraw_cs);
|
||||
return hr;
|
||||
}
|
||||
|
@ -823,14 +823,9 @@ IDirect3DImpl_7_CreateDevice(IDirect3D7 *iface,
|
||||
* Ideally, a IWineD3DIndexBuffer::SetData method could be created, which
|
||||
* takes the pointer and avoids the memcpy
|
||||
*/
|
||||
hr = IWineD3DDevice_CreateIndexBuffer(This->wineD3DDevice,
|
||||
0x40000, /* Length. Don't know how long it should be */
|
||||
WINED3DUSAGE_DYNAMIC, /* Usage */
|
||||
WINED3DFMT_INDEX16, /* Format. D3D7 uses WORDS */
|
||||
WINED3DPOOL_DEFAULT,
|
||||
&object->indexbuffer,
|
||||
0 /* Handle */,
|
||||
(IUnknown *)IndexBufferParent);
|
||||
hr = IWineD3DDevice_CreateIndexBuffer(This->wineD3DDevice, 0x40000 /* Length. Don't know how long it should be */,
|
||||
WINED3DUSAGE_DYNAMIC /* Usage */, WINED3DFMT_R16_UINT /* Format. D3D7 uses WORDS */, WINED3DPOOL_DEFAULT,
|
||||
&object->indexbuffer, 0 /* Handle */, (IUnknown *)IndexBufferParent);
|
||||
|
||||
if(FAILED(hr))
|
||||
{
|
||||
@ -1120,7 +1115,7 @@ IDirect3DImpl_7_EnumZBufferFormats(IDirect3D7 *iface,
|
||||
* 16-bit depth formats to be listed before the 24 and 32 ones. */
|
||||
WINED3DFORMAT FormatList[] = {
|
||||
WINED3DFMT_D15S1,
|
||||
WINED3DFMT_D16,
|
||||
WINED3DFMT_D16_UNORM,
|
||||
WINED3DFMT_D24X8,
|
||||
WINED3DFMT_D24X4S4,
|
||||
WINED3DFMT_D24S8,
|
||||
|
@ -154,7 +154,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
DDPixelFormat->u4.dwBBitMask = 0x00;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_A8:
|
||||
case WINED3DFMT_A8_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_ALPHA;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwAlphaBitDepth = 8;
|
||||
@ -186,7 +186,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
|
||||
/* How are Z buffer bit depth and Stencil buffer bit depth related?
|
||||
*/
|
||||
case WINED3DFMT_D16:
|
||||
case WINED3DFMT_D16_UNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_ZBUFFER;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwZBufferBitDepth = 16;
|
||||
@ -305,7 +305,7 @@ PixelFormat_WineD3DtoDD(DDPIXELFORMAT *DDPixelFormat,
|
||||
break;
|
||||
|
||||
/* Bump mapping */
|
||||
case WINED3DFMT_V8U8:
|
||||
case WINED3DFMT_R8G8_SNORM:
|
||||
DDPixelFormat->dwFlags = DDPF_BUMPDUDV;
|
||||
DDPixelFormat->dwFourCC = 0;
|
||||
DDPixelFormat->u1.dwBumpBitCount = 16;
|
||||
@ -447,7 +447,7 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
case 4:
|
||||
ERR("Unsupported Alpha-Only bit depth 0x%x\n", DDPixelFormat->u1.dwAlphaBitDepth);
|
||||
case 8:
|
||||
return WINED3DFMT_A8;
|
||||
return WINED3DFMT_A8_UNORM;
|
||||
|
||||
default:
|
||||
ERR("Invalid AlphaBitDepth in Alpha-Only Pixelformat\n");
|
||||
@ -538,10 +538,10 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
{
|
||||
case 8:
|
||||
ERR("8 Bit Z buffers are not supported. Trying a 16 Bit one\n");
|
||||
return WINED3DFMT_D16;
|
||||
return WINED3DFMT_D16_UNORM;
|
||||
|
||||
case 16:
|
||||
return WINED3DFMT_D16;
|
||||
return WINED3DFMT_D16_UNORM;
|
||||
|
||||
case 24:
|
||||
FIXME("24 Bit depth buffer, treating like a 32 bit one\n");
|
||||
@ -611,7 +611,7 @@ PixelFormat_DD2WineD3D(const DDPIXELFORMAT *DDPixelFormat)
|
||||
(DDPixelFormat->u3.dwBumpDvBitMask == 0x0000ff00) &&
|
||||
(DDPixelFormat->u4.dwBumpLuminanceBitMask == 0x00000000) )
|
||||
{
|
||||
return WINED3DFMT_V8U8;
|
||||
return WINED3DFMT_R8G8_SNORM;
|
||||
}
|
||||
else if ( (DDPixelFormat->u1.dwBumpBitCount == 16 ) &&
|
||||
(DDPixelFormat->u2.dwBumpDuBitMask == 0x0000001f) &&
|
||||
|
@ -5303,7 +5303,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitive(IWineD3DDevice *
|
||||
minIndex, NumVertices, startIndex, primCount);
|
||||
|
||||
IWineD3DIndexBuffer_GetDesc(pIB, &IdxBufDsc);
|
||||
if (IdxBufDsc.Format == WINED3DFMT_INDEX16) {
|
||||
if (IdxBufDsc.Format == WINED3DFMT_R16_UINT) {
|
||||
idxStride = 2;
|
||||
} else {
|
||||
idxStride = 4;
|
||||
@ -5380,7 +5380,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveUP(IWineD3DDevice *
|
||||
return WINED3DERR_INVALIDCALL;
|
||||
}
|
||||
|
||||
if (IndexDataFormat == WINED3DFMT_INDEX16) {
|
||||
if (IndexDataFormat == WINED3DFMT_R16_UINT) {
|
||||
idxStride = 2;
|
||||
} else {
|
||||
idxStride = 4;
|
||||
@ -5443,7 +5443,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_DrawIndexedPrimitiveStrided(IWineD3DDev
|
||||
WINED3DFORMAT IndexDataFormat)
|
||||
{
|
||||
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
|
||||
DWORD idxSize = (IndexDataFormat == WINED3DFMT_INDEX32 ? 4 : 2);
|
||||
DWORD idxSize = (IndexDataFormat == WINED3DFMT_R32_UINT ? 4 : 2);
|
||||
|
||||
/* Mark the state dirty until we have nicer tracking
|
||||
* its fine to change baseVertexIndex because that call is only called by ddraw which does not need
|
||||
@ -6263,7 +6263,7 @@ static inline DWORD argb_to_fmt(DWORD color, WINED3DFORMAT destfmt) {
|
||||
TRACE("Returning %08x\n", ret);
|
||||
return ret;
|
||||
|
||||
case WINED3DFMT_A8:
|
||||
case WINED3DFMT_A8_UNORM:
|
||||
TRACE("Returning %08x\n", a);
|
||||
return a;
|
||||
|
||||
@ -6291,7 +6291,7 @@ static inline DWORD argb_to_fmt(DWORD color, WINED3DFORMAT destfmt) {
|
||||
return ret;
|
||||
|
||||
case WINED3DFMT_X8B8G8R8:
|
||||
case WINED3DFMT_A8B8G8R8:
|
||||
case WINED3DFMT_R8G8B8A8_UNORM:
|
||||
ret = a << 24;
|
||||
ret |= b << 16;
|
||||
ret |= g << 8;
|
||||
@ -6311,7 +6311,7 @@ static inline DWORD argb_to_fmt(DWORD color, WINED3DFORMAT destfmt) {
|
||||
TRACE("Returning %08x\n", ret);
|
||||
return ret;
|
||||
|
||||
case WINED3DFMT_A2B10G10R10:
|
||||
case WINED3DFMT_R10G10B10A2_UNORM:
|
||||
a = (a * 4) / 256;
|
||||
r = (r * 1024) / 256;
|
||||
g = (g * 1024) / 256;
|
||||
|
@ -1729,17 +1729,17 @@ static BOOL IWineD3DImpl_IsPixelFormatCompatibleWithRenderFmt(const WineD3D_Pixe
|
||||
|
||||
return TRUE;
|
||||
} else if(cfg->iPixelType == WGL_TYPE_RGBA_FLOAT_ARB) { /* Float RGBA formats; TODO: WGL_NV_float_buffer */
|
||||
if(Format == WINED3DFMT_R16F)
|
||||
if(Format == WINED3DFMT_R16_FLOAT)
|
||||
return (cfg->redSize == 16 && cfg->greenSize == 0 && cfg->blueSize == 0 && cfg->alphaSize == 0);
|
||||
if(Format == WINED3DFMT_G16R16F)
|
||||
if(Format == WINED3DFMT_R16G16_FLOAT)
|
||||
return (cfg->redSize == 16 && cfg->greenSize == 16 && cfg->blueSize == 0 && cfg->alphaSize == 0);
|
||||
if(Format == WINED3DFMT_A16B16G16R16F)
|
||||
if(Format == WINED3DFMT_R16G16B16A16_FLOAT)
|
||||
return (cfg->redSize == 16 && cfg->greenSize == 16 && cfg->blueSize == 16 && cfg->alphaSize == 16);
|
||||
if(Format == WINED3DFMT_R32F)
|
||||
if(Format == WINED3DFMT_R32_FLOAT)
|
||||
return (cfg->redSize == 32 && cfg->greenSize == 0 && cfg->blueSize == 0 && cfg->alphaSize == 0);
|
||||
if(Format == WINED3DFMT_G32R32F)
|
||||
if(Format == WINED3DFMT_R32G32_FLOAT)
|
||||
return (cfg->redSize == 32 && cfg->greenSize == 32 && cfg->blueSize == 0 && cfg->alphaSize == 0);
|
||||
if(Format == WINED3DFMT_A32B32G32R32F)
|
||||
if(Format == WINED3DFMT_R32G32B32A32_FLOAT)
|
||||
return (cfg->redSize == 32 && cfg->greenSize == 32 && cfg->blueSize == 32 && cfg->alphaSize == 32);
|
||||
} else {
|
||||
/* Probably a color index mode */
|
||||
@ -1997,11 +1997,11 @@ static BOOL CheckBumpMapCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINE
|
||||
const struct GlPixelFormatDesc *glDesc;
|
||||
|
||||
switch(CheckFormat) {
|
||||
case WINED3DFMT_V8U8:
|
||||
case WINED3DFMT_V16U16:
|
||||
case WINED3DFMT_R8G8_SNORM:
|
||||
case WINED3DFMT_R16G16_SNORM:
|
||||
case WINED3DFMT_L6V5U5:
|
||||
case WINED3DFMT_X8L8V8U8:
|
||||
case WINED3DFMT_Q8W8V8U8:
|
||||
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
|
||||
* support this will be an identity conversion. */
|
||||
@ -2222,13 +2222,13 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINE
|
||||
case WINED3DFMT_X1R5G5B5:
|
||||
case WINED3DFMT_A1R5G5B5:
|
||||
case WINED3DFMT_A4R4G4B4:
|
||||
case WINED3DFMT_A8:
|
||||
case WINED3DFMT_A8_UNORM:
|
||||
case WINED3DFMT_X4R4G4B4:
|
||||
case WINED3DFMT_A8B8G8R8:
|
||||
case WINED3DFMT_R8G8B8A8_UNORM:
|
||||
case WINED3DFMT_X8B8G8R8:
|
||||
case WINED3DFMT_A2R10G10B10:
|
||||
case WINED3DFMT_A2B10G10R10:
|
||||
case WINED3DFMT_G16R16:
|
||||
case WINED3DFMT_R10G10B10A2_UNORM:
|
||||
case WINED3DFMT_R16G16_UNORM:
|
||||
TRACE_(d3d_caps)("[OK]\n");
|
||||
return TRUE;
|
||||
|
||||
@ -2264,7 +2264,7 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINE
|
||||
* Supported: Depth/Stencil formats
|
||||
*/
|
||||
case WINED3DFMT_D16_LOCKABLE:
|
||||
case WINED3DFMT_D16:
|
||||
case WINED3DFMT_D16_UNORM:
|
||||
case WINED3DFMT_D15S1:
|
||||
case WINED3DFMT_D24X8:
|
||||
case WINED3DFMT_D24X4S4:
|
||||
@ -2278,11 +2278,11 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINE
|
||||
* Not supported everywhere(depends on GL_ATI_envmap_bumpmap or
|
||||
* GL_NV_texture_shader). Emulated by shaders
|
||||
*/
|
||||
case WINED3DFMT_V8U8:
|
||||
case WINED3DFMT_R8G8_SNORM:
|
||||
case WINED3DFMT_X8L8V8U8:
|
||||
case WINED3DFMT_L6V5U5:
|
||||
case WINED3DFMT_Q8W8V8U8:
|
||||
case WINED3DFMT_V16U16:
|
||||
case WINED3DFMT_R8G8B8A8_SNORM:
|
||||
case WINED3DFMT_R16G16_SNORM:
|
||||
/* Ask the shader backend if it can deal with the conversion. If
|
||||
* we've got a GL extension giving native support this will be an
|
||||
* identity conversion. */
|
||||
@ -2313,9 +2313,9 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINE
|
||||
* Odd formats - not supported
|
||||
*/
|
||||
case WINED3DFMT_VERTEXDATA:
|
||||
case WINED3DFMT_INDEX16:
|
||||
case WINED3DFMT_INDEX32:
|
||||
case WINED3DFMT_Q16W16V16U16:
|
||||
case WINED3DFMT_R16_UINT:
|
||||
case WINED3DFMT_R32_UINT:
|
||||
case WINED3DFMT_R16G16B16A16_SNORM:
|
||||
case WINED3DFMT_A2W10V10U10:
|
||||
case WINED3DFMT_W11V11U10:
|
||||
TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
|
||||
@ -2342,14 +2342,14 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINE
|
||||
return FALSE;
|
||||
|
||||
/* Not supported */
|
||||
case WINED3DFMT_A16B16G16R16:
|
||||
case WINED3DFMT_R16G16B16A16_UNORM:
|
||||
case WINED3DFMT_A8R3G3B2:
|
||||
TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
|
||||
return FALSE;
|
||||
|
||||
/* Floating point formats */
|
||||
case WINED3DFMT_R16F:
|
||||
case WINED3DFMT_A16B16G16R16F:
|
||||
case WINED3DFMT_R16_FLOAT:
|
||||
case WINED3DFMT_R16G16B16A16_FLOAT:
|
||||
if(GL_SUPPORT(ARB_TEXTURE_FLOAT) && GL_SUPPORT(ARB_HALF_FLOAT_PIXEL)) {
|
||||
TRACE_(d3d_caps)("[OK]\n");
|
||||
return TRUE;
|
||||
@ -2357,8 +2357,8 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINE
|
||||
TRACE_(d3d_caps)("[FAILED]\n");
|
||||
return FALSE;
|
||||
|
||||
case WINED3DFMT_R32F:
|
||||
case WINED3DFMT_A32B32G32R32F:
|
||||
case WINED3DFMT_R32_FLOAT:
|
||||
case WINED3DFMT_R32G32B32A32_FLOAT:
|
||||
if (GL_SUPPORT(ARB_TEXTURE_FLOAT)) {
|
||||
TRACE_(d3d_caps)("[OK]\n");
|
||||
return TRUE;
|
||||
@ -2366,8 +2366,8 @@ static BOOL CheckTextureCapability(UINT Adapter, WINED3DDEVTYPE DeviceType, WINE
|
||||
TRACE_(d3d_caps)("[FAILED]\n");
|
||||
return FALSE;
|
||||
|
||||
case WINED3DFMT_G16R16F:
|
||||
case WINED3DFMT_G32R32F:
|
||||
case WINED3DFMT_R16G16_FLOAT:
|
||||
case WINED3DFMT_R32G32_FLOAT:
|
||||
if(GL_SUPPORT(ARB_TEXTURE_RG)) {
|
||||
TRACE_(d3d_caps)("[OK]\n");
|
||||
return TRUE;
|
||||
@ -2455,15 +2455,15 @@ static BOOL CheckSurfaceCapability(UINT Adapter, WINED3DFORMAT AdapterFormat, WI
|
||||
case WINED3DFMT_A1R5G5B5:
|
||||
case WINED3DFMT_A4R4G4B4:
|
||||
case WINED3DFMT_R3G3B2:
|
||||
case WINED3DFMT_A8:
|
||||
case WINED3DFMT_A8_UNORM:
|
||||
case WINED3DFMT_A8R3G3B2:
|
||||
case WINED3DFMT_X4R4G4B4:
|
||||
case WINED3DFMT_A2B10G10R10:
|
||||
case WINED3DFMT_A8B8G8R8:
|
||||
case WINED3DFMT_R10G10B10A2_UNORM:
|
||||
case WINED3DFMT_R8G8B8A8_UNORM:
|
||||
case WINED3DFMT_X8B8G8R8:
|
||||
case WINED3DFMT_G16R16:
|
||||
case WINED3DFMT_R16G16_UNORM:
|
||||
case WINED3DFMT_A2R10G10B10:
|
||||
case WINED3DFMT_A16B16G16R16:
|
||||
case WINED3DFMT_R16G16B16A16_UNORM:
|
||||
case WINED3DFMT_P8:
|
||||
TRACE_(d3d_caps)("[OK]\n");
|
||||
return TRUE;
|
||||
@ -2500,7 +2500,7 @@ static BOOL CheckVertexTextureCapability(UINT Adapter, WINED3DFORMAT CheckFormat
|
||||
}
|
||||
|
||||
switch (CheckFormat) {
|
||||
case WINED3DFMT_A32B32G32R32F:
|
||||
case WINED3DFMT_R32G32B32A32_FLOAT:
|
||||
if (!GL_SUPPORT(ARB_TEXTURE_FLOAT)) {
|
||||
TRACE_(d3d_caps)("[FAILED]\n");
|
||||
return FALSE;
|
||||
@ -2920,23 +2920,23 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
|
||||
switch(CheckFormat) {
|
||||
case WINED3DFMT_P8:
|
||||
case WINED3DFMT_A4L4:
|
||||
case WINED3DFMT_R32F:
|
||||
case WINED3DFMT_R16F:
|
||||
case WINED3DFMT_R32_FLOAT:
|
||||
case WINED3DFMT_R16_FLOAT:
|
||||
case WINED3DFMT_X8L8V8U8:
|
||||
case WINED3DFMT_L6V5U5:
|
||||
case WINED3DFMT_G16R16:
|
||||
case WINED3DFMT_R16G16_UNORM:
|
||||
TRACE_(d3d_caps)("[FAILED] - No converted formats on volumes\n");
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
|
||||
case WINED3DFMT_Q8W8V8U8:
|
||||
case WINED3DFMT_V16U16:
|
||||
case WINED3DFMT_R8G8B8A8_SNORM:
|
||||
case WINED3DFMT_R16G16_SNORM:
|
||||
if(!GL_SUPPORT(NV_TEXTURE_SHADER)) {
|
||||
TRACE_(d3d_caps)("[FAILED] - No converted formats on volumes\n");
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
}
|
||||
break;
|
||||
|
||||
case WINED3DFMT_V8U8:
|
||||
case WINED3DFMT_R8G8_SNORM:
|
||||
if(!GL_SUPPORT(NV_TEXTURE_SHADER)) {
|
||||
TRACE_(d3d_caps)("[FAILED] - No converted formats on volumes\n");
|
||||
return WINED3DERR_NOTAVAILABLE;
|
||||
|
@ -1708,7 +1708,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
}
|
||||
break;
|
||||
|
||||
case WINED3DFMT_V8U8:
|
||||
case WINED3DFMT_R8G8_SNORM:
|
||||
if(GL_SUPPORT(NV_TEXTURE_SHADER3)) break;
|
||||
*convert = CONVERT_V8U8;
|
||||
*format = GL_BGR;
|
||||
@ -1748,7 +1748,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
}
|
||||
break;
|
||||
|
||||
case WINED3DFMT_Q8W8V8U8:
|
||||
case WINED3DFMT_R8G8B8A8_SNORM:
|
||||
if(GL_SUPPORT(NV_TEXTURE_SHADER3)) break;
|
||||
*convert = CONVERT_Q8W8V8U8;
|
||||
*format = GL_BGRA;
|
||||
@ -1757,7 +1757,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
*target_bpp = 4;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_V16U16:
|
||||
case WINED3DFMT_R16G16_SNORM:
|
||||
if(GL_SUPPORT(NV_TEXTURE_SHADER3)) break;
|
||||
*convert = CONVERT_V16U16;
|
||||
*format = GL_BGR;
|
||||
@ -1778,7 +1778,7 @@ HRESULT d3dfmt_get_conv(IWineD3DSurfaceImpl *This, BOOL need_alpha_ck, BOOL use_
|
||||
*target_bpp = 2;
|
||||
break;
|
||||
|
||||
case WINED3DFMT_G16R16:
|
||||
case WINED3DFMT_R16G16_UNORM:
|
||||
*convert = CONVERT_G16R16;
|
||||
*format = GL_RGB;
|
||||
*internal = GL_RGB16_EXT;
|
||||
@ -3641,7 +3641,7 @@ static HRESULT IWineD3DSurfaceImpl_BltZ(IWineD3DSurfaceImpl *This, const RECT *D
|
||||
|
||||
if (Flags & WINEDDBLT_DEPTHFILL) {
|
||||
switch(This->resource.format) {
|
||||
case WINED3DFMT_D16:
|
||||
case WINED3DFMT_D16_UNORM:
|
||||
depth = (float) DDBltFx->u5.dwFillDepth / (float) 0x0000ffff;
|
||||
break;
|
||||
case WINED3DFMT_D15S1:
|
||||
|
@ -617,12 +617,12 @@ HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) {
|
||||
case WINED3DFMT_X4R4G4B4:
|
||||
case WINED3DFMT_R3G3B2:
|
||||
case WINED3DFMT_A8R3G3B2:
|
||||
case WINED3DFMT_A2B10G10R10:
|
||||
case WINED3DFMT_A8B8G8R8:
|
||||
case WINED3DFMT_R10G10B10A2_UNORM:
|
||||
case WINED3DFMT_R8G8B8A8_UNORM:
|
||||
case WINED3DFMT_X8B8G8R8:
|
||||
case WINED3DFMT_A2R10G10B10:
|
||||
case WINED3DFMT_R5G6B5:
|
||||
case WINED3DFMT_A16B16G16R16:
|
||||
case WINED3DFMT_R16G16B16A16_UNORM:
|
||||
usage = 0;
|
||||
b_info->bmiHeader.biCompression = BI_BITFIELDS;
|
||||
masks[0] = formatEntry->redMask;
|
||||
@ -681,7 +681,7 @@ HRESULT IWineD3DBaseSurfaceImpl_CreateDIBSection(IWineD3DSurface *iface) {
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
static void convert_r32f_r16f(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
|
||||
static void convert_r32_float_r16_float(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
|
||||
unsigned int w, unsigned int h)
|
||||
{
|
||||
unsigned int x, y;
|
||||
@ -745,7 +745,7 @@ struct d3dfmt_convertor_desc {
|
||||
|
||||
static const struct d3dfmt_convertor_desc convertors[] =
|
||||
{
|
||||
{WINED3DFMT_R32F, WINED3DFMT_R16F, convert_r32f_r16f},
|
||||
{WINED3DFMT_R32_FLOAT, WINED3DFMT_R16_FLOAT, convert_r32_float_r16_float},
|
||||
{WINED3DFMT_R5G6B5, WINED3DFMT_X8R8G8B8, convert_r5g6b5_x8r8g8b8},
|
||||
};
|
||||
|
||||
|
@ -39,83 +39,83 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
* formats are not usable in 2D rendering because ddraw doesn't support them.
|
||||
*/
|
||||
static const StaticPixelFormatDesc formats[] = {
|
||||
/*{WINED3DFORMAT ,alphamask ,redmask ,greenmask ,bluemask ,bpp ,depth ,stencil, isFourcc*/
|
||||
{WINED3DFMT_UNKNOWN ,0x0 ,0x0 ,0x0 ,0x0 ,1 ,0 ,0 ,FALSE },
|
||||
/* WINED3DFORMAT alphamask redmask greenmask bluemask bpp depth stencil isFourcc */
|
||||
{WINED3DFMT_UNKNOWN, 0x0, 0x0, 0x0, 0x0, 1, 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 },
|
||||
{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_R32F ,0x0 ,0x0 ,0x0 ,0x0 ,4 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_G32R32F ,0x0 ,0x0 ,0x0 ,0x0 ,8 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_A32B32G32R32F,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_R32G32B32A32_FLOAT, 0x1, 0x0, 0x0, 0x0, 16, 0, 0, FALSE},
|
||||
/* Hmm? */
|
||||
{WINED3DFMT_CxV8U8 ,0x0 ,0x0 ,0x0 ,0x0 ,2 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_CxV8U8, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
/* Float */
|
||||
{WINED3DFMT_R16F ,0x0 ,0x0 ,0x0 ,0x0 ,2 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_G16R16F ,0x0 ,0x0 ,0x0 ,0x0 ,4 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_A16B16G16R16F,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_R16G16B16A16_FLOAT, 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_A8P8, 0x0000ff00, 0x0, 0x0, 0x0, 2, 0, 0, FALSE},
|
||||
{WINED3DFMT_P8, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, FALSE},
|
||||
/* Standard ARGB formats. Keep WINED3DFMT_R8G8B8(=20) at position 20 */
|
||||
{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 ,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_A2B10G10R10 ,0xb0000000 ,0x000003ff ,0x000ffc00 ,0x3ff00000 ,4 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_A8B8G8R8 ,0xff000000 ,0x000000ff ,0x0000ff00 ,0x00ff0000 ,4 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_X8B8G8R8 ,0x0 ,0x000000ff ,0x0000ff00 ,0x00ff0000 ,4 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_G16R16 ,0x0 ,0x0000ffff ,0xffff0000 ,0x0 ,4 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_A2R10G10B10 ,0xb0000000 ,0x3ff00000 ,0x000ffc00 ,0x000003ff ,4 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_A16B16G16R16,0x1 ,0x0000ffff ,0xffff0000 ,0x0 ,8 ,0 ,0 ,FALSE },
|
||||
{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, 0xb0000000, 0x000003ff, 0x000ffc00, 0x3ff00000, 4, 0, 0, FALSE},
|
||||
{WINED3DFMT_R8G8B8A8_UNORM, 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, 0xb0000000, 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, 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},
|
||||
/* Bump mapping stuff */
|
||||
{WINED3DFMT_V8U8 ,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_Q8W8V8U8 ,0x0 ,0x0 ,0x0 ,0x0 ,4 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_V16U16 ,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_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},
|
||||
/* 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 ,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 },
|
||||
{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_INDEX16 ,0x0 ,0x0 ,0x0 ,0x0 ,2 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_INDEX32 ,0x0 ,0x0 ,0x0 ,0x0 ,4 ,0 ,0 ,FALSE },
|
||||
{WINED3DFMT_Q16W16V16U16,0x0 ,0x0 ,0x0 ,0x0 ,8 ,0 ,0 ,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 },
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@ -131,10 +131,12 @@ typedef struct {
|
||||
* table.
|
||||
*/
|
||||
static const GlPixelFormatDescTemplate gl_formats_template[] = {
|
||||
/*{ internal ,srgbInternal , rtInternal, format ,type \
|
||||
,Flags }*/
|
||||
{WINED3DFMT_UNKNOWN ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
/* WINED3DFORMAT internal srgbInternal rtInternal
|
||||
format type
|
||||
flags */
|
||||
{WINED3DFMT_UNKNOWN, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
/* FourCC formats */
|
||||
/* GL_APPLE_ycbcr_422 claims that its '2YUV' format, which is supported via the UNSIGNED_SHORT_8_8_REV_APPLE type
|
||||
* is equivalent to 'UYVY' format on Windows, and the 'YUVS' via UNSIGNED_SHORT_8_8_APPLE equates to 'YUY2'. The
|
||||
@ -142,144 +144,208 @@ 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_RGB ,GL_RGB , 0, GL_YCBCR_422_APPLE ,UNSIGNED_SHORT_8_8_APPLE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_YUY2 ,GL_RGB ,GL_RGB , 0, GL_YCBCR_422_APPLE ,UNSIGNED_SHORT_8_8_REV_APPLE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_YV12 ,GL_ALPHA ,GL_ALPHA , 0, GL_ALPHA ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_DXT1 ,GL_COMPRESSED_RGBA_S3TC_DXT1_EXT ,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT , 0, GL_RGBA ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_DXT2 ,GL_COMPRESSED_RGBA_S3TC_DXT3_EXT ,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT , 0, GL_RGBA ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_DXT3 ,GL_COMPRESSED_RGBA_S3TC_DXT3_EXT ,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT , 0, GL_RGBA ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_DXT4 ,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT ,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT , 0, GL_RGBA ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_DXT5 ,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT ,GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT , 0, GL_RGBA ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_MULTI2_ARGB8 ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
{WINED3DFMT_G8R8_G8B8 ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
{WINED3DFMT_R8G8_B8G8 ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
{WINED3DFMT_UYVY, GL_RGB, GL_RGB, 0,
|
||||
GL_YCBCR_422_APPLE, UNSIGNED_SHORT_8_8_APPLE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_YUY2, GL_RGB, GL_RGB, 0,
|
||||
GL_YCBCR_422_APPLE, UNSIGNED_SHORT_8_8_REV_APPLE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_YV12, GL_ALPHA, GL_ALPHA, 0,
|
||||
GL_ALPHA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_DXT1, GL_COMPRESSED_RGBA_S3TC_DXT1_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_DXT2, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_DXT3, GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_DXT4, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_DXT5, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_MULTI2_ARGB8, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
{WINED3DFMT_G8R8_G8B8, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
{WINED3DFMT_R8G8_B8G8, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
/* IEEE formats */
|
||||
{WINED3DFMT_R32F ,GL_RGB32F_ARB ,GL_RGB32F_ARB , 0, GL_RED ,GL_FLOAT
|
||||
,WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_G32R32F ,GL_RG32F ,GL_RG32F , 0, GL_RG ,GL_FLOAT
|
||||
,WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_A32B32G32R32F ,GL_RGBA32F_ARB ,GL_RGBA32F_ARB , 0, GL_RGBA ,GL_FLOAT
|
||||
,WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_R32_FLOAT, GL_RGB32F_ARB, GL_RGB32F_ARB, 0,
|
||||
GL_RED, GL_FLOAT,
|
||||
WINED3DFMT_FLAG_RENDERTARGET},
|
||||
{WINED3DFMT_R32G32_FLOAT, GL_RG32F, GL_RG32F, 0,
|
||||
GL_RG, GL_FLOAT,
|
||||
WINED3DFMT_FLAG_RENDERTARGET},
|
||||
{WINED3DFMT_R32G32B32A32_FLOAT, GL_RGBA32F_ARB, GL_RGBA32F_ARB, 0,
|
||||
GL_RGBA, GL_FLOAT,
|
||||
WINED3DFMT_FLAG_RENDERTARGET},
|
||||
/* Hmm? */
|
||||
{WINED3DFMT_CxV8U8 ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
{WINED3DFMT_CxV8U8, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
/* Float */
|
||||
{WINED3DFMT_R16F ,GL_RGB16F_ARB ,GL_RGB16F_ARB , 0, GL_RED ,GL_HALF_FLOAT_ARB
|
||||
,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_G16R16F ,GL_RG16F ,GL_RG16F , 0, GL_RG ,GL_HALF_FLOAT_ARB
|
||||
,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_A16B16G16R16F ,GL_RGBA16F_ARB ,GL_RGBA16F_ARB , 0, GL_RGBA ,GL_HALF_FLOAT_ARB
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_R16_FLOAT, GL_RGB16F_ARB, GL_RGB16F_ARB, 0,
|
||||
GL_RED, GL_HALF_FLOAT_ARB,
|
||||
WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
|
||||
{WINED3DFMT_R16G16_FLOAT, GL_RG16F, GL_RG16F, 0,
|
||||
GL_RG, GL_HALF_FLOAT_ARB,
|
||||
WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
|
||||
{WINED3DFMT_R16G16B16A16_FLOAT, GL_RGBA16F_ARB, GL_RGBA16F_ARB, 0,
|
||||
GL_RGBA, GL_HALF_FLOAT_ARB,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
|
||||
/* Palettized formats */
|
||||
{WINED3DFMT_A8P8, 0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
{WINED3DFMT_P8, GL_COLOR_INDEX8_EXT ,GL_COLOR_INDEX8_EXT , 0, GL_COLOR_INDEX ,GL_UNSIGNED_BYTE
|
||||
,0 },
|
||||
{WINED3DFMT_A8P8, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
{WINED3DFMT_P8, GL_COLOR_INDEX8_EXT, GL_COLOR_INDEX8_EXT, 0,
|
||||
GL_COLOR_INDEX, GL_UNSIGNED_BYTE,
|
||||
0},
|
||||
/* Standard ARGB formats */
|
||||
{WINED3DFMT_R8G8B8 ,GL_RGB8 ,GL_RGB8 , 0, GL_BGR ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_A8R8G8B8 ,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_X8R8G8B8 ,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_R5G6B5 ,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_X1R5G5B5 ,GL_RGB5 ,GL_RGB5_A1 , 0, GL_BGRA ,GL_UNSIGNED_SHORT_1_5_5_5_REV
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_A1R5G5B5 ,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_A4R4G4B4 ,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_R3G3B2 ,GL_R3_G3_B2 ,GL_R3_G3_B2 , 0, GL_RGB ,GL_UNSIGNED_BYTE_3_3_2
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING },
|
||||
{WINED3DFMT_A8 ,GL_ALPHA8 ,GL_ALPHA8 , 0, GL_ALPHA ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING },
|
||||
{WINED3DFMT_A8R3G3B2 ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
{WINED3DFMT_X4R4G4B4 ,GL_RGB4 ,GL_RGB4 , 0, GL_BGRA ,GL_UNSIGNED_SHORT_4_4_4_4_REV
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_A2B10G10R10 ,GL_RGB10_A2 ,GL_RGB10_A2 , 0, GL_RGBA ,GL_UNSIGNED_INT_2_10_10_10_REV
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_A8B8G8R8 ,GL_RGBA8 ,GL_RGBA8 , 0, GL_RGBA ,GL_UNSIGNED_INT_8_8_8_8_REV
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_X8B8G8R8 ,GL_RGB8 ,GL_RGB8 , 0, GL_RGBA ,GL_UNSIGNED_INT_8_8_8_8_REV
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_G16R16 ,GL_RGB16_EXT ,GL_RGB16_EXT , 0, GL_RGB ,GL_UNSIGNED_SHORT
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_A2R10G10B10 ,GL_RGB10_A2 ,GL_RGB10_A2 , 0, GL_BGRA ,GL_UNSIGNED_INT_2_10_10_10_REV
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_A16B16G16R16 ,GL_RGBA16_EXT ,GL_RGBA16_EXT , 0, GL_RGBA ,GL_UNSIGNED_SHORT
|
||||
,WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET },
|
||||
{WINED3DFMT_R8G8B8, GL_RGB8, GL_RGB8, 0,
|
||||
GL_BGR, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_RENDERTARGET},
|
||||
{WINED3DFMT_A8R8G8B8, 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_X8R8G8B8, 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_R5G6B5, 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_X1R5G5B5, GL_RGB5, GL_RGB5_A1, 0,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_A1R5G5B5, 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_A4R4G4B4, 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_R3G3B2, GL_R3_G3_B2, GL_R3_G3_B2, 0,
|
||||
GL_RGB, GL_UNSIGNED_BYTE_3_3_2,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING},
|
||||
{WINED3DFMT_A8_UNORM, GL_ALPHA8, GL_ALPHA8, 0,
|
||||
GL_ALPHA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING},
|
||||
{WINED3DFMT_A8R3G3B2, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
{WINED3DFMT_X4R4G4B4, GL_RGB4, GL_RGB4, 0,
|
||||
GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
|
||||
{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},
|
||||
{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_X8B8G8R8, GL_RGB8, GL_RGB8, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_R16G16_UNORM, GL_RGB16_EXT, GL_RGB16_EXT, 0,
|
||||
GL_RGB, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_A2R10G10B10, GL_RGB10_A2, GL_RGB10_A2, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_2_10_10_10_REV,
|
||||
WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING},
|
||||
{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},
|
||||
/* Luminance */
|
||||
{WINED3DFMT_L8 ,GL_LUMINANCE8 ,GL_SLUMINANCE8_EXT , 0, GL_LUMINANCE ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_A8L8 ,GL_LUMINANCE8_ALPHA8 ,GL_SLUMINANCE8_ALPHA8_EXT , 0, GL_LUMINANCE_ALPHA ,GL_UNSIGNED_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_A4L4 ,GL_LUMINANCE4_ALPHA4 ,GL_LUMINANCE4_ALPHA4 , 0, GL_LUMINANCE_ALPHA ,GL_UNSIGNED_BYTE
|
||||
,0 },
|
||||
{WINED3DFMT_L8, GL_LUMINANCE8, GL_SLUMINANCE8_EXT, 0,
|
||||
GL_LUMINANCE, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_A8L8, GL_LUMINANCE8_ALPHA8, GL_SLUMINANCE8_ALPHA8_EXT, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_A4L4, GL_LUMINANCE4_ALPHA4, GL_LUMINANCE4_ALPHA4, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
0},
|
||||
/* Bump mapping stuff */
|
||||
{WINED3DFMT_V8U8 ,GL_DSDT8_NV ,GL_DSDT8_NV , 0, GL_DSDT_NV ,GL_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_L6V5U5 ,GL_DSDT8_MAG8_NV ,GL_DSDT8_MAG8_NV , 0, GL_DSDT_MAG_NV ,GL_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{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_FLAG_FILTERING },
|
||||
{WINED3DFMT_Q8W8V8U8 ,GL_SIGNED_RGBA8_NV ,GL_SIGNED_RGBA8_NV , 0, GL_RGBA ,GL_BYTE
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_V16U16 ,GL_SIGNED_HILO16_NV ,GL_SIGNED_HILO16_NV , 0, GL_HILO_NV ,GL_SHORT
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_W11V11U10 ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
{WINED3DFMT_A2W10V10U10 ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
{WINED3DFMT_R8G8_SNORM, GL_DSDT8_NV, GL_DSDT8_NV, 0,
|
||||
GL_DSDT_NV, GL_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_L6V5U5, GL_DSDT8_MAG8_NV, GL_DSDT8_MAG8_NV, 0,
|
||||
GL_DSDT_MAG_NV, GL_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{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_FLAG_FILTERING},
|
||||
{WINED3DFMT_R8G8B8A8_SNORM, GL_SIGNED_RGBA8_NV, GL_SIGNED_RGBA8_NV, 0,
|
||||
GL_RGBA, GL_BYTE,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_R16G16_SNORM, GL_SIGNED_HILO16_NV, GL_SIGNED_HILO16_NV, 0,
|
||||
GL_HILO_NV, GL_SHORT,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_W11V11U10, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
{WINED3DFMT_A2W10V10U10, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
/* Depth stencil formats */
|
||||
{WINED3DFMT_D16_LOCKABLE ,GL_DEPTH_COMPONENT24_ARB ,GL_DEPTH_COMPONENT24_ARB , 0, GL_DEPTH_COMPONENT ,GL_UNSIGNED_SHORT
|
||||
,WINED3DFMT_FLAG_DEPTH },
|
||||
{WINED3DFMT_D32 ,GL_DEPTH_COMPONENT32_ARB ,GL_DEPTH_COMPONENT32_ARB , 0, GL_DEPTH_COMPONENT ,GL_UNSIGNED_INT
|
||||
,WINED3DFMT_FLAG_DEPTH },
|
||||
{WINED3DFMT_D15S1 ,GL_DEPTH_COMPONENT24_ARB ,GL_DEPTH_COMPONENT24_ARB , 0, GL_DEPTH_COMPONENT ,GL_UNSIGNED_SHORT
|
||||
,WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL },
|
||||
{WINED3DFMT_D24S8 ,GL_DEPTH_COMPONENT24_ARB ,GL_DEPTH_COMPONENT24_ARB , 0, GL_DEPTH_COMPONENT ,GL_UNSIGNED_INT
|
||||
,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL },
|
||||
{WINED3DFMT_D24X8 ,GL_DEPTH_COMPONENT24_ARB ,GL_DEPTH_COMPONENT24_ARB , 0, GL_DEPTH_COMPONENT ,GL_UNSIGNED_INT
|
||||
,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH },
|
||||
{WINED3DFMT_D24X4S4 ,GL_DEPTH_COMPONENT24_ARB ,GL_DEPTH_COMPONENT24_ARB , 0, GL_DEPTH_COMPONENT ,GL_UNSIGNED_INT
|
||||
,WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL },
|
||||
{WINED3DFMT_D16 ,GL_DEPTH_COMPONENT24_ARB ,GL_DEPTH_COMPONENT24_ARB , 0, GL_DEPTH_COMPONENT ,GL_UNSIGNED_SHORT
|
||||
,WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH },
|
||||
{WINED3DFMT_L16 ,GL_LUMINANCE16_EXT ,GL_LUMINANCE16_EXT , 0, GL_LUMINANCE ,GL_UNSIGNED_SHORT
|
||||
,WINED3DFMT_FLAG_FILTERING },
|
||||
{WINED3DFMT_D32F_LOCKABLE ,GL_DEPTH_COMPONENT32_ARB ,GL_DEPTH_COMPONENT32_ARB , 0, GL_DEPTH_COMPONENT ,GL_FLOAT
|
||||
,WINED3DFMT_FLAG_DEPTH },
|
||||
{WINED3DFMT_D24FS8 ,GL_DEPTH_COMPONENT24_ARB ,GL_DEPTH_COMPONENT24_ARB , 0, GL_DEPTH_COMPONENT ,GL_FLOAT
|
||||
,WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL},
|
||||
{WINED3DFMT_D16_LOCKABLE, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_DEPTH},
|
||||
{WINED3DFMT_D32, GL_DEPTH_COMPONENT32_ARB, GL_DEPTH_COMPONENT32_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
WINED3DFMT_FLAG_DEPTH},
|
||||
{WINED3DFMT_D15S1, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL},
|
||||
{WINED3DFMT_D24S8, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL},
|
||||
{WINED3DFMT_D24X8, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH},
|
||||
{WINED3DFMT_D24X4S4, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_INT,
|
||||
WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL},
|
||||
{WINED3DFMT_D16_UNORM, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_FILTERING | WINED3DFMT_FLAG_DEPTH},
|
||||
{WINED3DFMT_L16, GL_LUMINANCE16_EXT, GL_LUMINANCE16_EXT, 0,
|
||||
GL_LUMINANCE, GL_UNSIGNED_SHORT,
|
||||
WINED3DFMT_FLAG_FILTERING},
|
||||
{WINED3DFMT_D32F_LOCKABLE, GL_DEPTH_COMPONENT32_ARB, GL_DEPTH_COMPONENT32_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_FLOAT,
|
||||
WINED3DFMT_FLAG_DEPTH},
|
||||
{WINED3DFMT_D24FS8, GL_DEPTH_COMPONENT24_ARB, GL_DEPTH_COMPONENT24_ARB, 0,
|
||||
GL_DEPTH_COMPONENT, GL_FLOAT,
|
||||
WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL},
|
||||
/* Is this a vertex buffer? */
|
||||
{WINED3DFMT_VERTEXDATA ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
{WINED3DFMT_INDEX16 ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
{WINED3DFMT_INDEX32 ,0 ,0 , 0, 0 ,0
|
||||
,0 },
|
||||
{WINED3DFMT_Q16W16V16U16 ,GL_COLOR_INDEX ,GL_COLOR_INDEX , 0, GL_COLOR_INDEX ,GL_UNSIGNED_SHORT
|
||||
,0 },
|
||||
{WINED3DFMT_VERTEXDATA, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
{WINED3DFMT_R16_UINT, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
{WINED3DFMT_R32_UINT, 0, 0, 0,
|
||||
0, 0,
|
||||
0},
|
||||
{WINED3DFMT_R16G16B16A16_SNORM, GL_COLOR_INDEX, GL_COLOR_INDEX, 0,
|
||||
GL_COLOR_INDEX, GL_UNSIGNED_SHORT,
|
||||
0},
|
||||
/* Vendor-specific formats */
|
||||
{WINED3DFMT_ATI2N ,0 ,0 , 0, GL_LUMINANCE_ALPHA ,GL_UNSIGNED_BYTE
|
||||
,0 },
|
||||
{WINED3DFMT_NVHU ,0 ,0 , 0, GL_LUMINANCE_ALPHA ,GL_UNSIGNED_BYTE
|
||||
,0 },
|
||||
{WINED3DFMT_NVHS ,0 ,0 , 0, GL_LUMINANCE_ALPHA ,GL_UNSIGNED_BYTE
|
||||
,0 }
|
||||
{WINED3DFMT_ATI2N, 0, 0, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
0},
|
||||
{WINED3DFMT_NVHU, 0, 0, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
0},
|
||||
{WINED3DFMT_NVHS, 0, 0, 0,
|
||||
GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE,
|
||||
0}
|
||||
};
|
||||
|
||||
static inline int getFmtIdx(WINED3DFORMAT fmt) {
|
||||
@ -363,7 +429,7 @@ BOOL initPixelFormats(WineD3D_GL_Info *gl_info)
|
||||
}
|
||||
}
|
||||
|
||||
dst = getFmtIdx(WINED3DFMT_R16F);
|
||||
dst = getFmtIdx(WINED3DFMT_R16_FLOAT);
|
||||
gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
|
||||
0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_W);
|
||||
/* When ARB_texture_rg is supported we only require 16-bit for R16F instead of 64-bit RGBA16F */
|
||||
@ -373,7 +439,7 @@ BOOL initPixelFormats(WineD3D_GL_Info *gl_info)
|
||||
gl_info->gl_formats[dst].glGammaInternal = GL_R16F;
|
||||
}
|
||||
|
||||
dst = getFmtIdx(WINED3DFMT_R32F);
|
||||
dst = getFmtIdx(WINED3DFMT_R32_FLOAT);
|
||||
gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
|
||||
0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_W);
|
||||
/* When ARB_texture_rg is supported we only require 32-bit for R32F instead of 128-bit RGBA32F */
|
||||
@ -383,15 +449,15 @@ BOOL initPixelFormats(WineD3D_GL_Info *gl_info)
|
||||
gl_info->gl_formats[dst].glGammaInternal = GL_R32F;
|
||||
}
|
||||
|
||||
dst = getFmtIdx(WINED3DFMT_G16R16);
|
||||
dst = getFmtIdx(WINED3DFMT_R16G16_UNORM);
|
||||
gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
|
||||
0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_W);
|
||||
|
||||
dst = getFmtIdx(WINED3DFMT_G16R16F);
|
||||
dst = getFmtIdx(WINED3DFMT_R16G16_FLOAT);
|
||||
gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
|
||||
0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_W);
|
||||
|
||||
dst = getFmtIdx(WINED3DFMT_G32R32F);
|
||||
dst = getFmtIdx(WINED3DFMT_R32G32_FLOAT);
|
||||
gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
|
||||
0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_W);
|
||||
|
||||
@ -406,19 +472,19 @@ BOOL initPixelFormats(WineD3D_GL_Info *gl_info)
|
||||
*/
|
||||
if (!GL_SUPPORT(NV_TEXTURE_SHADER))
|
||||
{
|
||||
dst = getFmtIdx(WINED3DFMT_V8U8);
|
||||
dst = getFmtIdx(WINED3DFMT_R8G8_SNORM);
|
||||
gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
|
||||
1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE);
|
||||
dst = getFmtIdx(WINED3DFMT_V16U16);
|
||||
dst = getFmtIdx(WINED3DFMT_R16G16_SNORM);
|
||||
gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
|
||||
1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
dst = getFmtIdx(WINED3DFMT_V8U8);
|
||||
dst = getFmtIdx(WINED3DFMT_R8G8_SNORM);
|
||||
gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
|
||||
0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE);
|
||||
dst = getFmtIdx(WINED3DFMT_V16U16);
|
||||
dst = getFmtIdx(WINED3DFMT_R16G16_SNORM);
|
||||
gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
|
||||
0, CHANNEL_SOURCE_X, 0, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_ONE, 0, CHANNEL_SOURCE_ONE);
|
||||
}
|
||||
@ -433,7 +499,7 @@ BOOL initPixelFormats(WineD3D_GL_Info *gl_info)
|
||||
dst = getFmtIdx(WINED3DFMT_X8L8V8U8);
|
||||
gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
|
||||
1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Y, 0, CHANNEL_SOURCE_Z, 0, CHANNEL_SOURCE_W);
|
||||
dst = getFmtIdx(WINED3DFMT_Q8W8V8U8);
|
||||
dst = getFmtIdx(WINED3DFMT_R8G8B8A8_SNORM);
|
||||
gl_info->gl_formats[dst].color_fixup = create_color_fixup_desc(
|
||||
1, CHANNEL_SOURCE_X, 1, CHANNEL_SOURCE_Y, 1, CHANNEL_SOURCE_Z, 1, CHANNEL_SOURCE_W);
|
||||
} else {
|
||||
@ -565,25 +631,17 @@ const char* debug_d3dformat(WINED3DFORMAT fmt) {
|
||||
FMT_TO_STR(WINED3DFMT_A1R5G5B5);
|
||||
FMT_TO_STR(WINED3DFMT_A4R4G4B4);
|
||||
FMT_TO_STR(WINED3DFMT_R3G3B2);
|
||||
FMT_TO_STR(WINED3DFMT_A8);
|
||||
FMT_TO_STR(WINED3DFMT_A8R3G3B2);
|
||||
FMT_TO_STR(WINED3DFMT_X4R4G4B4);
|
||||
FMT_TO_STR(WINED3DFMT_A2B10G10R10);
|
||||
FMT_TO_STR(WINED3DFMT_A8B8G8R8);
|
||||
FMT_TO_STR(WINED3DFMT_X8B8G8R8);
|
||||
FMT_TO_STR(WINED3DFMT_G16R16);
|
||||
FMT_TO_STR(WINED3DFMT_A2R10G10B10);
|
||||
FMT_TO_STR(WINED3DFMT_A16B16G16R16);
|
||||
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_V8U8);
|
||||
FMT_TO_STR(WINED3DFMT_L6V5U5);
|
||||
FMT_TO_STR(WINED3DFMT_X8L8V8U8);
|
||||
FMT_TO_STR(WINED3DFMT_Q8W8V8U8);
|
||||
FMT_TO_STR(WINED3DFMT_V16U16);
|
||||
FMT_TO_STR(WINED3DFMT_W11V11U10);
|
||||
FMT_TO_STR(WINED3DFMT_A2W10V10U10);
|
||||
FMT_TO_STR(WINED3DFMT_UYVY);
|
||||
@ -603,24 +661,102 @@ const char* debug_d3dformat(WINED3DFORMAT fmt) {
|
||||
FMT_TO_STR(WINED3DFMT_D24S8);
|
||||
FMT_TO_STR(WINED3DFMT_D24X8);
|
||||
FMT_TO_STR(WINED3DFMT_D24X4S4);
|
||||
FMT_TO_STR(WINED3DFMT_D16);
|
||||
FMT_TO_STR(WINED3DFMT_L16);
|
||||
FMT_TO_STR(WINED3DFMT_D32F_LOCKABLE);
|
||||
FMT_TO_STR(WINED3DFMT_D24FS8);
|
||||
FMT_TO_STR(WINED3DFMT_VERTEXDATA);
|
||||
FMT_TO_STR(WINED3DFMT_INDEX16);
|
||||
FMT_TO_STR(WINED3DFMT_INDEX32);
|
||||
FMT_TO_STR(WINED3DFMT_Q16W16V16U16);
|
||||
FMT_TO_STR(WINED3DFMT_R16F);
|
||||
FMT_TO_STR(WINED3DFMT_G16R16F);
|
||||
FMT_TO_STR(WINED3DFMT_A16B16G16R16F);
|
||||
FMT_TO_STR(WINED3DFMT_R32F);
|
||||
FMT_TO_STR(WINED3DFMT_G32R32F);
|
||||
FMT_TO_STR(WINED3DFMT_A32B32G32R32F);
|
||||
FMT_TO_STR(WINED3DFMT_CxV8U8);
|
||||
FMT_TO_STR(WINED3DFMT_ATI2N);
|
||||
FMT_TO_STR(WINED3DFMT_NVHU);
|
||||
FMT_TO_STR(WINED3DFMT_NVHS);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32B32A32_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32B32A32_FLOAT);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32B32A32_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32B32A32_SINT);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32B32_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32B32_FLOAT);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32B32_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32B32_SINT);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16B16A16_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16B16A16_FLOAT);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16B16A16_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16B16A16_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16B16A16_SNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16B16A16_SINT);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32_FLOAT);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R32G32_SINT);
|
||||
FMT_TO_STR(WINED3DFMT_R32G8X24_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_D32_FLOAT_S8X24_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R32_FLOAT_X8X24_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_X32_TYPELESS_G8X24_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R10G10B10A2_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_R10G10B10A2_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R10G10B10A2_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R11G11B10_FLOAT);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8B8A8_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8B8A8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8B8A8_UNORM_SRGB);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8B8A8_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8B8A8_SNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8B8A8_SINT);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16_FLOAT);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16_SNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R16G16_SINT);
|
||||
FMT_TO_STR(WINED3DFMT_R32_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_D32_FLOAT);
|
||||
FMT_TO_STR(WINED3DFMT_R32_FLOAT);
|
||||
FMT_TO_STR(WINED3DFMT_R32_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R32_SINT);
|
||||
FMT_TO_STR(WINED3DFMT_R24G8_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_D24_UNORM_S8_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R24_UNORM_X8_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_X24_TYPELESS_G8_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8_SNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8_SINT);
|
||||
FMT_TO_STR(WINED3DFMT_R16_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_R16_FLOAT);
|
||||
FMT_TO_STR(WINED3DFMT_D16_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R16_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R16_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R16_SNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R16_SINT);
|
||||
FMT_TO_STR(WINED3DFMT_R8_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_R8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R8_UINT);
|
||||
FMT_TO_STR(WINED3DFMT_R8_SNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R8_SINT);
|
||||
FMT_TO_STR(WINED3DFMT_A8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R1_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_R9G9B9E5_SHAREDEXP);
|
||||
FMT_TO_STR(WINED3DFMT_R8G8_B8G8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_G8R8_G8B8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_BC1_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_BC1_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_BC1_UNORM_SRGB);
|
||||
FMT_TO_STR(WINED3DFMT_BC2_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_BC2_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_BC2_UNORM_SRGB);
|
||||
FMT_TO_STR(WINED3DFMT_BC3_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_BC3_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_BC3_UNORM_SRGB);
|
||||
FMT_TO_STR(WINED3DFMT_BC4_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_BC4_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_BC4_SNORM);
|
||||
FMT_TO_STR(WINED3DFMT_BC5_TYPELESS);
|
||||
FMT_TO_STR(WINED3DFMT_BC5_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_BC5_SNORM);
|
||||
FMT_TO_STR(WINED3DFMT_B5G6R5_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_B5G5R5A1_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_B8G8R8A8_UNORM);
|
||||
FMT_TO_STR(WINED3DFMT_B8G8R8X8_UNORM);
|
||||
#undef FMT_TO_STR
|
||||
default:
|
||||
{
|
||||
@ -1439,7 +1575,7 @@ BOOL getDepthStencilBits(WINED3DFORMAT fmt, short *depthSize, short *stencilSize
|
||||
switch(fmt)
|
||||
{
|
||||
case WINED3DFMT_D16_LOCKABLE:
|
||||
case WINED3DFMT_D16:
|
||||
case WINED3DFMT_D16_UNORM:
|
||||
case WINED3DFMT_D15S1:
|
||||
case WINED3DFMT_D24X8:
|
||||
case WINED3DFMT_D24X4S4:
|
||||
|
@ -126,58 +126,130 @@ typedef enum _WINED3DDEGREETYPE
|
||||
|
||||
typedef enum _WINED3DFORMAT
|
||||
{
|
||||
WINED3DFMT_UNKNOWN = 0,
|
||||
WINED3DFMT_R8G8B8 = 20,
|
||||
WINED3DFMT_A8R8G8B8 = 21,
|
||||
WINED3DFMT_X8R8G8B8 = 22,
|
||||
WINED3DFMT_R5G6B5 = 23,
|
||||
WINED3DFMT_X1R5G5B5 = 24,
|
||||
WINED3DFMT_A1R5G5B5 = 25,
|
||||
WINED3DFMT_A4R4G4B4 = 26,
|
||||
WINED3DFMT_R3G3B2 = 27,
|
||||
WINED3DFMT_A8 = 28,
|
||||
WINED3DFMT_A8R3G3B2 = 29,
|
||||
WINED3DFMT_X4R4G4B4 = 30,
|
||||
WINED3DFMT_A2B10G10R10 = 31,
|
||||
WINED3DFMT_A8B8G8R8 = 32,
|
||||
WINED3DFMT_X8B8G8R8 = 33,
|
||||
WINED3DFMT_G16R16 = 34,
|
||||
WINED3DFMT_A2R10G10B10 = 35,
|
||||
WINED3DFMT_A16B16G16R16 = 36,
|
||||
WINED3DFMT_A8P8 = 40,
|
||||
WINED3DFMT_P8 = 41,
|
||||
WINED3DFMT_L8 = 50,
|
||||
WINED3DFMT_A8L8 = 51,
|
||||
WINED3DFMT_A4L4 = 52,
|
||||
WINED3DFMT_V8U8 = 60,
|
||||
WINED3DFMT_L6V5U5 = 61,
|
||||
WINED3DFMT_X8L8V8U8 = 62,
|
||||
WINED3DFMT_Q8W8V8U8 = 63,
|
||||
WINED3DFMT_V16U16 = 64,
|
||||
WINED3DFMT_W11V11U10 = 65,
|
||||
WINED3DFMT_A2W10V10U10 = 67,
|
||||
WINED3DFMT_D16_LOCKABLE = 70,
|
||||
WINED3DFMT_D32 = 71,
|
||||
WINED3DFMT_D15S1 = 73,
|
||||
WINED3DFMT_D24S8 = 75,
|
||||
WINED3DFMT_D24X8 = 77,
|
||||
WINED3DFMT_D24X4S4 = 79,
|
||||
WINED3DFMT_D16 = 80,
|
||||
WINED3DFMT_L16 = 81,
|
||||
WINED3DFMT_D32F_LOCKABLE = 82,
|
||||
WINED3DFMT_D24FS8 = 83,
|
||||
WINED3DFMT_VERTEXDATA = 100,
|
||||
WINED3DFMT_INDEX16 = 101,
|
||||
WINED3DFMT_INDEX32 = 102,
|
||||
WINED3DFMT_Q16W16V16U16 = 110,
|
||||
WINED3DFMT_R16F = 111,
|
||||
WINED3DFMT_G16R16F = 112,
|
||||
WINED3DFMT_A16B16G16R16F = 113,
|
||||
WINED3DFMT_R32F = 114,
|
||||
WINED3DFMT_G32R32F = 115,
|
||||
WINED3DFMT_A32B32G32R32F = 116,
|
||||
WINED3DFMT_CxV8U8 = 117,
|
||||
WINED3DFMT_FORCE_DWORD = 0xffffffff
|
||||
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_D16_LOCKABLE,
|
||||
WINED3DFMT_D32,
|
||||
WINED3DFMT_D15S1,
|
||||
WINED3DFMT_D24S8,
|
||||
WINED3DFMT_D24X8,
|
||||
WINED3DFMT_D24X4S4,
|
||||
WINED3DFMT_L16,
|
||||
WINED3DFMT_D32F_LOCKABLE,
|
||||
WINED3DFMT_D24FS8,
|
||||
WINED3DFMT_VERTEXDATA,
|
||||
WINED3DFMT_CxV8U8,
|
||||
/* DXGI formats */
|
||||
WINED3DFMT_R32G32B32A32_TYPELESS,
|
||||
WINED3DFMT_R32G32B32A32_FLOAT,
|
||||
WINED3DFMT_R32G32B32A32_UINT,
|
||||
WINED3DFMT_R32G32B32A32_SINT,
|
||||
WINED3DFMT_R32G32B32_TYPELESS,
|
||||
WINED3DFMT_R32G32B32_FLOAT,
|
||||
WINED3DFMT_R32G32B32_UINT,
|
||||
WINED3DFMT_R32G32B32_SINT,
|
||||
WINED3DFMT_R16G16B16A16_TYPELESS,
|
||||
WINED3DFMT_R16G16B16A16_FLOAT,
|
||||
WINED3DFMT_R16G16B16A16_UNORM,
|
||||
WINED3DFMT_R16G16B16A16_UINT,
|
||||
WINED3DFMT_R16G16B16A16_SNORM,
|
||||
WINED3DFMT_R16G16B16A16_SINT,
|
||||
WINED3DFMT_R32G32_TYPELESS,
|
||||
WINED3DFMT_R32G32_FLOAT,
|
||||
WINED3DFMT_R32G32_UINT,
|
||||
WINED3DFMT_R32G32_SINT,
|
||||
WINED3DFMT_R32G8X24_TYPELESS,
|
||||
WINED3DFMT_D32_FLOAT_S8X24_UINT,
|
||||
WINED3DFMT_R32_FLOAT_X8X24_TYPELESS,
|
||||
WINED3DFMT_X32_TYPELESS_G8X24_UINT,
|
||||
WINED3DFMT_R10G10B10A2_TYPELESS,
|
||||
WINED3DFMT_R10G10B10A2_UNORM,
|
||||
WINED3DFMT_R10G10B10A2_UINT,
|
||||
WINED3DFMT_R11G11B10_FLOAT,
|
||||
WINED3DFMT_R8G8B8A8_TYPELESS,
|
||||
WINED3DFMT_R8G8B8A8_UNORM,
|
||||
WINED3DFMT_R8G8B8A8_UNORM_SRGB,
|
||||
WINED3DFMT_R8G8B8A8_UINT,
|
||||
WINED3DFMT_R8G8B8A8_SNORM,
|
||||
WINED3DFMT_R8G8B8A8_SINT,
|
||||
WINED3DFMT_R16G16_TYPELESS,
|
||||
WINED3DFMT_R16G16_FLOAT,
|
||||
WINED3DFMT_R16G16_UNORM,
|
||||
WINED3DFMT_R16G16_UINT,
|
||||
WINED3DFMT_R16G16_SNORM,
|
||||
WINED3DFMT_R16G16_SINT,
|
||||
WINED3DFMT_R32_TYPELESS,
|
||||
WINED3DFMT_D32_FLOAT,
|
||||
WINED3DFMT_R32_FLOAT,
|
||||
WINED3DFMT_R32_UINT,
|
||||
WINED3DFMT_R32_SINT,
|
||||
WINED3DFMT_R24G8_TYPELESS,
|
||||
WINED3DFMT_D24_UNORM_S8_UINT,
|
||||
WINED3DFMT_R24_UNORM_X8_TYPELESS,
|
||||
WINED3DFMT_X24_TYPELESS_G8_UINT,
|
||||
WINED3DFMT_R8G8_TYPELESS,
|
||||
WINED3DFMT_R8G8_UNORM,
|
||||
WINED3DFMT_R8G8_UINT,
|
||||
WINED3DFMT_R8G8_SNORM,
|
||||
WINED3DFMT_R8G8_SINT,
|
||||
WINED3DFMT_R16_TYPELESS,
|
||||
WINED3DFMT_R16_FLOAT,
|
||||
WINED3DFMT_D16_UNORM,
|
||||
WINED3DFMT_R16_UNORM,
|
||||
WINED3DFMT_R16_UINT,
|
||||
WINED3DFMT_R16_SNORM,
|
||||
WINED3DFMT_R16_SINT,
|
||||
WINED3DFMT_R8_TYPELESS,
|
||||
WINED3DFMT_R8_UNORM,
|
||||
WINED3DFMT_R8_UINT,
|
||||
WINED3DFMT_R8_SNORM,
|
||||
WINED3DFMT_R8_SINT,
|
||||
WINED3DFMT_A8_UNORM,
|
||||
WINED3DFMT_R1_UNORM,
|
||||
WINED3DFMT_R9G9B9E5_SHAREDEXP,
|
||||
WINED3DFMT_R8G8_B8G8_UNORM,
|
||||
WINED3DFMT_G8R8_G8B8_UNORM,
|
||||
WINED3DFMT_BC1_TYPELESS,
|
||||
WINED3DFMT_BC1_UNORM,
|
||||
WINED3DFMT_BC1_UNORM_SRGB,
|
||||
WINED3DFMT_BC2_TYPELESS,
|
||||
WINED3DFMT_BC2_UNORM,
|
||||
WINED3DFMT_BC2_UNORM_SRGB,
|
||||
WINED3DFMT_BC3_TYPELESS,
|
||||
WINED3DFMT_BC3_UNORM,
|
||||
WINED3DFMT_BC3_UNORM_SRGB,
|
||||
WINED3DFMT_BC4_TYPELESS,
|
||||
WINED3DFMT_BC4_UNORM,
|
||||
WINED3DFMT_BC4_SNORM,
|
||||
WINED3DFMT_BC5_TYPELESS,
|
||||
WINED3DFMT_BC5_UNORM,
|
||||
WINED3DFMT_BC5_SNORM,
|
||||
WINED3DFMT_B5G6R5_UNORM,
|
||||
WINED3DFMT_B5G5R5A1_UNORM,
|
||||
WINED3DFMT_B8G8R8A8_UNORM,
|
||||
WINED3DFMT_B8G8R8X8_UNORM,
|
||||
|
||||
WINED3DFMT_FORCE_DWORD = 0xffffffff
|
||||
} WINED3DFORMAT;
|
||||
cpp_quote("#define WINEMAKEFOURCC(ch0, ch1, ch2, ch3) \\")
|
||||
cpp_quote(" ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \\")
|
||||
|
Loading…
Reference in New Issue
Block a user