Commit eb3c81fd authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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().
parent 46e231cc
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment