[PATCH 1/1] wined3d: Sampler states are 1-based.

Henri Verbeet hverbeet at codeweavers.com
Wed Jun 2 04:24:54 CDT 2010


0 isn't a valid sampler state, and including it would overflow the
stateblock's contained_sampler_states array in
stateblock_init_contained_states().
---
 dlls/wined3d/stateblock.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 1696646..181b357 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -262,7 +262,7 @@ static void stateblock_savedstates_set_all(SAVEDSTATES *states, DWORD vs_consts,
     stateblock_set_bits(states->transform, HIGHEST_TRANSFORMSTATE + 1);
     stateblock_set_bits(states->renderState, WINEHIGHEST_RENDER_STATE + 1);
     for (i = 0; i < MAX_TEXTURES; ++i) states->textureState[i] = 0x3ffff;
-    for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) states->samplerState[i] = 0x3fff;
+    for (i = 0; i < MAX_COMBINED_SAMPLERS; ++i) states->samplerState[i] = 0x3ffe;
     states->clipplane = 0xffffffff;
     states->pixelShaderConstantsB = 0xffff;
     states->pixelShaderConstantsI = 0xffff;
-- 
1.6.4.4




More information about the wine-patches mailing list