wined3d: Add support for WINED3DFMT_R11G11B10_FLOAT format.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2016-03-03 12:58:20 +01:00 committed by Alexandre Julliard
parent 90589e697e
commit f508181718
3 changed files with 9 additions and 0 deletions

View File

@ -185,6 +185,7 @@ static const struct wined3d_extension_map gl_extension_map[] =
{"GL_EXT_gpu_program_parameters", EXT_GPU_PROGRAM_PARAMETERS },
{"GL_EXT_gpu_shader4", EXT_GPU_SHADER4 },
{"GL_EXT_packed_depth_stencil", EXT_PACKED_DEPTH_STENCIL },
{"GL_EXT_packed_float", EXT_PACKED_FLOAT },
{"GL_EXT_point_parameters", EXT_POINT_PARAMETERS },
{"GL_EXT_provoking_vertex", EXT_PROVOKING_VERTEX },
{"GL_EXT_secondary_color", EXT_SECONDARY_COLOR },
@ -3411,6 +3412,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, DWORD
{ARB_TEXTURE_FLOAT, MAKEDWORD_VERSION(3, 0)},
{ARB_TEXTURE_RG, MAKEDWORD_VERSION(3, 0)},
{EXT_DRAW_BUFFERS2, MAKEDWORD_VERSION(3, 0)},
{EXT_PACKED_FLOAT, MAKEDWORD_VERSION(3, 0)},
{EXT_TEXTURE_INTEGER, MAKEDWORD_VERSION(3, 0)},
/* We don't want to enable EXT_GPU_SHADER4: even though similar
* functionality is available in core GL 3.0 / GLSL 1.30, it's different

View File

@ -100,6 +100,7 @@ static const struct wined3d_format_channels formats[] =
{WINED3DFMT_R8G8_SNORM_Cx, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0},
{WINED3DFMT_R16G16_SINT, 16, 16, 0, 0, 0, 16, 0, 0, 4, 0, 0},
{WINED3DFMT_R16G16B16A16_SINT, 16, 16, 16, 16, 0, 16, 32, 48, 8, 0, 0},
{WINED3DFMT_R11G11B10_FLOAT, 11, 11, 10, 0, 0, 11, 22, 0, 4, 0, 0},
/* Palettized formats */
{WINED3DFMT_P8_UINT_A8_UNORM, 0, 0, 0, 8, 0, 0, 0, 8, 2, 0, 0},
{WINED3DFMT_P8_UINT, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
@ -273,6 +274,7 @@ static const struct wined3d_format_base_flags format_base_flags[] =
{WINED3DFMT_R8G8B8X8_UNORM, WINED3DFMT_FLAG_GETDC},
{WINED3DFMT_ATI1N, WINED3DFMT_FLAG_BROKEN_PITCH},
{WINED3DFMT_ATI2N, WINED3DFMT_FLAG_BROKEN_PITCH},
{WINED3DFMT_R11G11B10_FLOAT, WINED3DFMT_FLAG_FLOAT},
{WINED3DFMT_D32_FLOAT, WINED3DFMT_FLAG_FLOAT},
{WINED3DFMT_S8_UINT_D24_FLOAT, WINED3DFMT_FLAG_FLOAT},
};
@ -1114,6 +1116,10 @@ static const struct wined3d_format_texture_info format_texture_info[] =
WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_RENDERTARGET
| WINED3DFMT_FLAG_VTF,
ARB_TEXTURE_FLOAT, NULL},
{WINED3DFMT_R11G11B10_FLOAT, GL_R11F_G11F_B10F, GL_R11F_G11F_B10F, 0,
GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, 0,
WINED3DFMT_FLAG_TEXTURE | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_RENDERTARGET,
EXT_PACKED_FLOAT},
/* Palettized formats */
{WINED3DFMT_P8_UINT, GL_ALPHA8, GL_ALPHA8, 0,
GL_ALPHA, GL_UNSIGNED_BYTE, 0,

View File

@ -119,6 +119,7 @@ enum wined3d_gl_extension
EXT_GPU_PROGRAM_PARAMETERS,
EXT_GPU_SHADER4,
EXT_PACKED_DEPTH_STENCIL,
EXT_PACKED_FLOAT,
EXT_POINT_PARAMETERS,
EXT_PROVOKING_VERTEX,
EXT_SECONDARY_COLOR,