[PATCH 3/5] wined3d: Pass stream info and needed fixups to buffer_find_decl.

Henri Verbeet hverbeet at gmail.com
Wed Sep 11 06:32:39 CDT 2013

On 11 September 2013 11:31, Stefan Dösinger <stefan at codeweavers.com> wrote:
> @@ -330,7 +331,7 @@ static BOOL buffer_find_decl(struct wined3d_buffer *This)
>          if(This->resource.usage & WINED3DUSAGE_STATICDECL) return FALSE;
>      }
> -    if (use_vs(state))
> +    if (fixup_flags & WINED3D_BUFFER_FIXUP_USE_SHADER)
It can actually be a bit simpler than that. Note that all the texcoord
checks are redundant when "support_d3dcolor" is true, because
declaration_element_valid_ffp() already prevents D3DCOLOR elements
from being used with texcoords. That then implies you can mostly just
pass the fixup mask to buffer_check_attribute(), and check for an
empty fixup mask instead of vertex shader usage here. (Although that
means inverting the flags as you have them right now.)

More information about the wine-devel mailing list