Commit 1cc75303 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Ignore unused attributes when generating the swizzle array.

parent f4d24492
......@@ -296,6 +296,9 @@ static inline void find_swizzled_attribs(IWineD3DVertexDeclaration *declaration,
for(i = 0; i < decl->num_swizzled_attribs; i++) {
for(j = 0; j < MAX_ATTRIBS; j++) {
if(!This->baseShader.reg_maps.attributes[j]) continue;
usage_token = This->semantics_in[j].usage;
usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
usage_idx = (usage_token & WINED3DSP_DCL_USAGEINDEX_MASK) >> WINED3DSP_DCL_USAGEINDEX_SHIFT;
......@@ -679,7 +682,7 @@ static inline BOOL swizzled_attribs_differ(IWineD3DVertexShaderImpl *This, IWine
for(i = 0; i < vdecl->declarationWNumElements; i++) {
for(j = 0; j < MAX_ATTRIBS; j++) {
if(!This->baseShader.reg_maps.attributes) continue;
if(!This->baseShader.reg_maps.attributes[j]) continue;
usage_token = This->semantics_in[j].usage;
usage = (usage_token & WINED3DSP_DCL_USAGE_MASK) >> WINED3DSP_DCL_USAGE_SHIFT;
......
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