[PATCH 2/5] wined3d: Properly check if an attribute is used in loadTexCoords().
Henri Verbeet
hverbeet at codeweavers.com
Mon Aug 24 02:27:52 CDT 2009
---
dlls/wined3d/state.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index e9fd804..8b4eb8f 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -3140,14 +3140,14 @@ static void loadTexCoords(const struct wined3d_context *context, IWineD3DStateBl
for (textureNo = 0; textureNo < GL_LIMITS(texture_stages); ++textureNo) {
int coordIdx = stateblock->textureState[textureNo][WINED3DTSS_TEXCOORDINDEX];
- const struct wined3d_stream_info_element *e;
mapped_stage = stateblock->wineD3DDevice->texUnitMap[textureNo];
if (mapped_stage == WINED3D_UNMAPPED_STAGE) continue;
- e = &si->elements[WINED3D_FFP_TEXCOORD0 + coordIdx];
- if (coordIdx < MAX_TEXTURES && (e->data || e->buffer_object))
+ if (coordIdx < MAX_TEXTURES && (si->use_map & (1 << (WINED3D_FFP_TEXCOORD0 + coordIdx))))
{
+ const struct wined3d_stream_info_element *e = &si->elements[WINED3D_FFP_TEXCOORD0 + coordIdx];
+
TRACE("Setting up texture %u, idx %d, cordindx %u, data %p\n",
textureNo, mapped_stage, coordIdx, e->data);
--
1.6.0.6
More information about the wine-patches
mailing list