From 92b66ac82cced7170821bd8d5abff5083b451bb9 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 19 Aug 2009 10:55:35 +0200 Subject: [PATCH] wined3d: Make use_vs() safe to call from IWineD3DDeviceImpl_FindTexUnitMap(). --- dlls/wined3d/wined3d_private.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 514c9a9995a..44bb10ee2ab 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); }