Commit a220669f authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Introduce WINED3DFMT_FLAG_VERTEX_ATTRIBUTE.

To indicate a format can be used for vertex attributes. Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e3fe1b09
......@@ -3692,6 +3692,7 @@ static BOOL init_format_vertex_info(const struct wined3d_adapter *adapter,
format->emit_idx = format_vertex_info[i].emit_idx;
format->gl_vtx_type = format_vertex_info[i].gl_vtx_type;
format->gl_vtx_format = format->component_count;
format->flags[WINED3D_GL_RES_TYPE_BUFFER] |= WINED3DFMT_FLAG_VERTEX_ATTRIBUTE;
}
if (gl_info->supported[ARB_VERTEX_ARRAY_BGRA])
......
......@@ -220,7 +220,7 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara
if (e->input_slot >= MAX_STREAMS)
continue;
if (!e->format->gl_vtx_format)
if (!(e->format->flags[WINED3D_GL_RES_TYPE_BUFFER] & WINED3DFMT_FLAG_VERTEX_ATTRIBUTE))
{
FIXME("The application tries to use an unsupported format (%s), returning E_FAIL.\n",
debug_d3dformat(elements[i].format));
......
......@@ -4293,6 +4293,7 @@ extern enum wined3d_format_id pixelformat_for_depth(DWORD depth) DECLSPEC_HIDDEN
#define WINED3DFMT_FLAG_INTEGER 0x00200000
#define WINED3DFMT_FLAG_GEN_MIPMAP 0x00400000
#define WINED3DFMT_FLAG_NORMALISED 0x00800000
#define WINED3DFMT_FLAG_VERTEX_ATTRIBUTE 0x01000000
struct wined3d_rational
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment