Commit 93c949eb authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use stateblock_init_contained_states() for WINED3DSBT_PIXELSTATE stateblocks.

parent 5a01619d
......@@ -1499,51 +1499,7 @@ HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *
TRACE("PIXELSTATE => Pretend all pixel states have changed.\n");
stateblock_savedstates_set_pixel(&stateblock->changed, gl_info);
/* Pixel Shader Constants. */
for (i = 0; i < gl_info->max_pshader_constantsF; ++i)
{
stateblock->contained_ps_consts_f[i] = i;
}
stateblock->num_contained_ps_consts_f = gl_info->max_pshader_constantsF;
for (i = 0; i < MAX_CONST_B; ++i)
{
stateblock->contained_ps_consts_b[i] = i;
}
stateblock->num_contained_ps_consts_b = MAX_CONST_B;
for (i = 0; i < MAX_CONST_I; ++i)
{
stateblock->contained_ps_consts_i[i] = i;
}
stateblock->num_contained_ps_consts_i = MAX_CONST_I;
for (i = 0; i < NUM_SAVEDPIXELSTATES_R; i++)
{
stateblock->contained_render_states[i] = SavedPixelStates_R[i];
}
stateblock->num_contained_render_states = NUM_SAVEDPIXELSTATES_R;
for (i = 0; i < MAX_TEXTURES; ++i)
{
for (j = 0; j < NUM_SAVEDPIXELSTATES_T; ++j)
{
stateblock->contained_tss_states[stateblock->num_contained_tss_states].stage = i;
stateblock->contained_tss_states[stateblock->num_contained_tss_states].state = SavedPixelStates_T[j];
++stateblock->num_contained_tss_states;
}
}
for (i = 0 ; i < MAX_COMBINED_SAMPLERS; ++i)
{
for (j = 0; j < NUM_SAVEDPIXELSTATES_S; ++j)
{
stateblock->contained_sampler_states[stateblock->num_contained_sampler_states].stage = i;
stateblock->contained_sampler_states[stateblock->num_contained_sampler_states].state = SavedPixelStates_S[j];
stateblock->num_contained_sampler_states++;
}
}
stateblock_init_contained_states(stateblock);
if (stateblock->pixelShader) IWineD3DPixelShader_AddRef(stateblock->pixelShader);
......
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