wined3d: Add support for WINEDFMT_R10G10B10A2_UNORM vertex 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:
parent
8c0ddf9827
commit
77c4bd0aa9
|
@ -329,6 +329,7 @@ struct wined3d_format_vertex_info
|
||||||
unsigned int component_count;
|
unsigned int component_count;
|
||||||
GLenum gl_vtx_type;
|
GLenum gl_vtx_type;
|
||||||
GLboolean gl_normalized;
|
GLboolean gl_normalized;
|
||||||
|
enum wined3d_gl_extension extension;
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct wined3d_format_vertex_info format_vertex_info[] =
|
static const struct wined3d_format_vertex_info format_vertex_info[] =
|
||||||
|
@ -349,6 +350,8 @@ static const struct wined3d_format_vertex_info format_vertex_info[] =
|
||||||
{WINED3DFMT_R16G16B16A16_UNORM, WINED3D_FFP_EMIT_USHORT4N, 4, GL_UNSIGNED_SHORT, GL_TRUE },
|
{WINED3DFMT_R16G16B16A16_UNORM, WINED3D_FFP_EMIT_USHORT4N, 4, GL_UNSIGNED_SHORT, GL_TRUE },
|
||||||
{WINED3DFMT_R10G10B10A2_UINT, WINED3D_FFP_EMIT_UDEC3, 3, GL_UNSIGNED_SHORT, GL_FALSE},
|
{WINED3DFMT_R10G10B10A2_UINT, WINED3D_FFP_EMIT_UDEC3, 3, GL_UNSIGNED_SHORT, GL_FALSE},
|
||||||
{WINED3DFMT_R10G10B10A2_SNORM, WINED3D_FFP_EMIT_DEC3N, 3, GL_SHORT, GL_TRUE },
|
{WINED3DFMT_R10G10B10A2_SNORM, WINED3D_FFP_EMIT_DEC3N, 3, GL_SHORT, GL_TRUE },
|
||||||
|
{WINED3DFMT_R10G10B10A2_UNORM, WINED3D_FFP_EMIT_INVALID, 4, GL_UNSIGNED_INT_2_10_10_10_REV, GL_TRUE,
|
||||||
|
ARB_VERTEX_TYPE_2_10_10_10_REV},
|
||||||
{WINED3DFMT_R16G16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_2, 2, GL_HALF_FLOAT, GL_FALSE},
|
{WINED3DFMT_R16G16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_2, 2, GL_HALF_FLOAT, GL_FALSE},
|
||||||
{WINED3DFMT_R16G16B16A16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_4, 4, GL_HALF_FLOAT, GL_FALSE},
|
{WINED3DFMT_R16G16B16A16_FLOAT, WINED3D_FFP_EMIT_FLOAT16_4, 4, GL_HALF_FLOAT, GL_FALSE},
|
||||||
{WINED3DFMT_R8G8B8A8_SNORM, WINED3D_FFP_EMIT_INVALID, 4, GL_BYTE, GL_TRUE },
|
{WINED3DFMT_R8G8B8A8_SNORM, WINED3D_FFP_EMIT_INVALID, 4, GL_BYTE, GL_TRUE },
|
||||||
|
@ -3273,6 +3276,8 @@ static unsigned int calculate_vertex_attribute_size(GLenum type, unsigned int co
|
||||||
return component_count * sizeof(GLint);
|
return component_count * sizeof(GLint);
|
||||||
case GL_UNSIGNED_INT:
|
case GL_UNSIGNED_INT:
|
||||||
return component_count * sizeof(GLuint);
|
return component_count * sizeof(GLuint);
|
||||||
|
case GL_UNSIGNED_INT_2_10_10_10_REV:
|
||||||
|
return sizeof(GLuint);
|
||||||
default:
|
default:
|
||||||
FIXME("Unhandled GL type %#x.\n", type);
|
FIXME("Unhandled GL type %#x.\n", type);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -3295,6 +3300,9 @@ static BOOL init_format_vertex_info(struct wined3d_gl_info *gl_info)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!gl_info->supported[format_vertex_info[i].extension])
|
||||||
|
continue;
|
||||||
|
|
||||||
format = &gl_info->formats[fmt_idx];
|
format = &gl_info->formats[fmt_idx];
|
||||||
format->emit_idx = format_vertex_info[i].emit_idx;
|
format->emit_idx = format_vertex_info[i].emit_idx;
|
||||||
format->component_count = format_vertex_info[i].component_count;
|
format->component_count = format_vertex_info[i].component_count;
|
||||||
|
|
Loading…
Reference in New Issue