Henri Verbeet : wined3d: Properly check if an attribute is used in loadTexCoords().
Module: wine Branch: master Commit: 850232810d546204597b06d410e71b47974ae221 URL: http://source.winehq.org/git/wine.git/?a=commit;h=850232810d546204597b06d410... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Mon Aug 24 09:27:52 2009 +0200 wined3d: Properly check if an attribute is used in loadTexCoords(). --- 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);
participants (1)
-
Alexandre Julliard