Commit bf1d4b56 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d10/effect: Handle rgba masks in stream output declarations.

parent 78f4ce0b
......@@ -611,7 +611,8 @@ static void d3d10_effect_cleanup_so_decl(struct d3d10_effect_so_decl *so_decl)
static HRESULT d3d10_effect_parse_stream_output_declaration(const char *decl,
struct d3d10_effect_so_decl *so_decl)
{
static const char * allmask = "xyzw";
static const char * xyzw = "xyzw";
static const char * rgba = "rgba";
char *p, *ptr, *end, *next, *mask, *m, *slot;
unsigned int len = strlen(decl);
D3D10_SO_DECLARATION_ENTRY e;
......@@ -665,13 +666,16 @@ static HRESULT d3d10_effect_parse_stream_output_declaration(const char *decl,
{
*mask = 0; mask++;
if (!(m = strstr(allmask, mask)))
if ((m = strstr(xyzw, mask)))
e.StartComponent = m - xyzw;
else if ((m = strstr(rgba, mask)))
e.StartComponent = m - rgba;
else
{
WARN("Invalid component mask %s.\n", debugstr_a(mask));
goto failed;
}
e.StartComponent = m - allmask;
e.ComponentCount = strlen(mask);
}
else
......
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