Module: wine Branch: master Commit: eb3c81fd6913385174202a37f47af052b8185d03 URL: http://source.winehq.org/git/wine.git/?a=commit;h=eb3c81fd6913385174202a37f4...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Jun 2 11:24:54 2010 +0200
wined3d: Sampler states are 1-based.
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;