wined3d: Add support for A16B16G16R16F and A32B32G32R32F texture formats.
This commit is contained in:
parent
aec5bc33f6
commit
bda6d092a5
|
@ -576,6 +576,12 @@ BOOL IWineD3DImpl_FillGLCaps(IWineD3D *iface, Display* display) {
|
||||||
} else if (strcmp(ThisExtn, "GL_ARB_texture_env_dot3") == 0) {
|
} else if (strcmp(ThisExtn, "GL_ARB_texture_env_dot3") == 0) {
|
||||||
TRACE_(d3d_caps)(" FOUND: ARB Dot3 support\n");
|
TRACE_(d3d_caps)(" FOUND: ARB Dot3 support\n");
|
||||||
gl_info->supported[ARB_TEXTURE_ENV_DOT3] = TRUE;
|
gl_info->supported[ARB_TEXTURE_ENV_DOT3] = TRUE;
|
||||||
|
} else if (strcmp(ThisExtn, "GL_ARB_texture_float") == 0) {
|
||||||
|
TRACE_(d3d_caps)(" FOUND: ARB Float texture support\n");
|
||||||
|
gl_info->supported[ARB_TEXTURE_FLOAT] = TRUE;
|
||||||
|
} else if (strcmp(ThisExtn, "GL_ARB_half_float_pixel") == 0) {
|
||||||
|
TRACE_(d3d_caps)(" FOUND: ARB Half-float pixel support\n");
|
||||||
|
gl_info->supported[ARB_HALF_FLOAT_PIXEL] = TRUE;
|
||||||
} else if (strcmp(ThisExtn, "GL_ARB_texture_border_clamp") == 0) {
|
} else if (strcmp(ThisExtn, "GL_ARB_texture_border_clamp") == 0) {
|
||||||
TRACE_(d3d_caps)(" FOUND: ARB Texture border clamp support\n");
|
TRACE_(d3d_caps)(" FOUND: ARB Texture border clamp support\n");
|
||||||
gl_info->supported[ARB_TEXTURE_BORDER_CLAMP] = TRUE;
|
gl_info->supported[ARB_TEXTURE_BORDER_CLAMP] = TRUE;
|
||||||
|
@ -1639,6 +1645,21 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GL_SUPPORT(ARB_TEXTURE_FLOAT)) {
|
||||||
|
|
||||||
|
BOOL half_pixel_support = GL_SUPPORT(ARB_HALF_FLOAT_PIXEL);
|
||||||
|
|
||||||
|
switch (CheckFormat) {
|
||||||
|
case D3DFMT_A16B16G16R16F:
|
||||||
|
if (!half_pixel_support) break;
|
||||||
|
case D3DFMT_A32B32G32R32F:
|
||||||
|
TRACE_(d3d_caps)("[OK]\n");
|
||||||
|
return WINED3D_OK;
|
||||||
|
default:
|
||||||
|
break; /* Avoid compiler warnings */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* This format is nothing special and it is supported perfectly.
|
/* This format is nothing special and it is supported perfectly.
|
||||||
* However, ati and nvidia driver on windows do not mark this format
|
* However, ati and nvidia driver on windows do not mark this format
|
||||||
* supported(tested with the dxCapsViewer) and pretending to
|
* supported(tested with the dxCapsViewer) and pretending to
|
||||||
|
@ -1729,10 +1750,8 @@ static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapt
|
||||||
*/
|
*/
|
||||||
case WINED3DFMT_R16F:
|
case WINED3DFMT_R16F:
|
||||||
case WINED3DFMT_G16R16F:
|
case WINED3DFMT_G16R16F:
|
||||||
case WINED3DFMT_A16B16G16R16F:
|
|
||||||
case WINED3DFMT_R32F:
|
case WINED3DFMT_R32F:
|
||||||
case WINED3DFMT_G32R32F:
|
case WINED3DFMT_G32R32F:
|
||||||
case WINED3DFMT_A32B32G32R32F:
|
|
||||||
case WINED3DFMT_CxV8U8:
|
case WINED3DFMT_CxV8U8:
|
||||||
TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
|
TRACE_(d3d_caps)("[FAILED]\n"); /* Enable when implemented */
|
||||||
return WINED3DERR_NOTAVAILABLE;
|
return WINED3DERR_NOTAVAILABLE;
|
||||||
|
|
|
@ -49,13 +49,13 @@ static const PixelFormatDesc formats[] = {
|
||||||
/* IEEE formats */
|
/* IEEE formats */
|
||||||
{WINED3DFMT_R32F ,0x0 ,0x0 ,0x0 ,0x0 ,4 ,FALSE ,0 ,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DFMT_A8P8 ,0x0000ff00 ,0x0 ,0x0 ,0x0 ,2 ,FALSE ,0 ,0 ,0 },
|
{WINED3DFMT_A8P8 ,0x0000ff00 ,0x0 ,0x0 ,0x0 ,2 ,FALSE ,0 ,0 ,0 },
|
||||||
{WINED3DFMT_P8 ,0x0 ,0x0 ,0x0 ,0x0 ,1 ,FALSE ,GL_COLOR_INDEX8_EXT ,GL_COLOR_INDEX ,GL_UNSIGNED_BYTE },
|
{WINED3DFMT_P8 ,0x0 ,0x0 ,0x0 ,0x0 ,1 ,FALSE ,GL_COLOR_INDEX8_EXT ,GL_COLOR_INDEX ,GL_UNSIGNED_BYTE },
|
||||||
|
|
|
@ -473,6 +473,17 @@ typedef void (APIENTRY * PGLFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint leve
|
||||||
#define GL_DOT3_RGB_EXT 0x8740
|
#define GL_DOT3_RGB_EXT 0x8740
|
||||||
#define GL_DOT3_RGBA_EXT 0x8741
|
#define GL_DOT3_RGBA_EXT 0x8741
|
||||||
#endif
|
#endif
|
||||||
|
/* GL_ARB_texture_float */
|
||||||
|
#ifndef GL_ARB_texture_float
|
||||||
|
#define GL_ARB_texture_float 1
|
||||||
|
#define GL_RGBA32F_ARB 0x8814
|
||||||
|
#define GL_RGBA16F_ARB 0x881A
|
||||||
|
#endif
|
||||||
|
/* GL_ARB_half_float_pixel */
|
||||||
|
#ifndef GL_ARB_half_float_pixel
|
||||||
|
#define GL_ARB_half_float_pixel
|
||||||
|
#define GL_HALF_FLOAT_ARB 0x140B
|
||||||
|
#endif
|
||||||
/* GL_ARB_vertex_program */
|
/* GL_ARB_vertex_program */
|
||||||
#ifndef GL_ARB_vertex_program
|
#ifndef GL_ARB_vertex_program
|
||||||
#define GL_ARB_vertex_program 1
|
#define GL_ARB_vertex_program 1
|
||||||
|
@ -1407,6 +1418,8 @@ typedef enum _GL_SupportedExt {
|
||||||
ARB_TEXTURE_ENV_ADD,
|
ARB_TEXTURE_ENV_ADD,
|
||||||
ARB_TEXTURE_ENV_COMBINE,
|
ARB_TEXTURE_ENV_COMBINE,
|
||||||
ARB_TEXTURE_ENV_DOT3,
|
ARB_TEXTURE_ENV_DOT3,
|
||||||
|
ARB_TEXTURE_FLOAT,
|
||||||
|
ARB_HALF_FLOAT_PIXEL,
|
||||||
ARB_TEXTURE_BORDER_CLAMP,
|
ARB_TEXTURE_BORDER_CLAMP,
|
||||||
ARB_TEXTURE_MIRRORED_REPEAT,
|
ARB_TEXTURE_MIRRORED_REPEAT,
|
||||||
ARB_VERTEX_PROGRAM,
|
ARB_VERTEX_PROGRAM,
|
||||||
|
|
Loading…
Reference in New Issue