wined3d: Introduce WINED3DFMT_FLAG_VERTEX_ATTRIBUTE.

To indicate a format can be used for vertex attributes.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2018-09-14 01:37:49 +04:30 committed by Alexandre Julliard
parent e3fe1b0946
commit a220669f33
3 changed files with 3 additions and 1 deletions

View file

@ -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])

View file

@ -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));

View file

@ -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
{