[PATCH 1/5] wined3d: Make use_vs() safe to call from IWineD3DDeviceImpl_FindTexUnitMap().
Henri Verbeet
hverbeet at codeweavers.com
Wed Aug 19 03:55:35 CDT 2009
---
dlls/wined3d/wined3d_private.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 514c9a9..44bb10e 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2885,8 +2885,12 @@ const struct GlPixelFormatDesc *getFormatDescEntry(WINED3DFORMAT fmt, const stru
static inline BOOL use_vs(IWineD3DStateBlockImpl *stateblock)
{
+ /* Check stateblock->vertexDecl to allow this to be used from
+ * IWineD3DDeviceImpl_FindTexUnitMap(). This is safe because
+ * stateblock->vertexShader implies a vertex declaration instead of ddraw
+ * style strided data. */
return (stateblock->vertexShader
- && !stateblock->wineD3DDevice->strided_streams.position_transformed
+ && !((IWineD3DVertexDeclarationImpl *)stateblock->vertexDecl)->position_transformed
&& stateblock->wineD3DDevice->vs_selected_mode != SHADER_NONE);
}
--
1.6.0.6
More information about the wine-patches
mailing list