Commit 15d4eee5 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use stateblock_init_contained_states() for WINED3DSBT_VERTEXSTATE stateblocks.

parent d500c9b7
......@@ -1455,7 +1455,7 @@ HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *
WINED3DSTATEBLOCKTYPE type, IUnknown *parent)
{
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
unsigned int i, j;
unsigned int i;
HRESULT hr;
stateblock->lpVtbl = &IWineD3DStateBlock_Vtbl;
......@@ -1542,51 +1542,7 @@ HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *
TRACE("VERTEXSTATE => Pretend all vertex shates have changed.\n");
stateblock_savedstates_set_vertex(&stateblock->changed, gl_info);
/* Vertex Shader Constants. */
for (i = 0; i < gl_info->max_vshader_constantsF; ++i)
{
stateblock->contained_vs_consts_f[i] = i;
}
stateblock->num_contained_vs_consts_f = gl_info->max_vshader_constantsF;
for (i = 0; i < MAX_CONST_B; ++i)
{
stateblock->contained_vs_consts_b[i] = i;
}
stateblock->num_contained_vs_consts_b = MAX_CONST_B;
for (i = 0; i < MAX_CONST_I; ++i)
{
stateblock->contained_vs_consts_i[i] = i;
}
stateblock->num_contained_vs_consts_i = MAX_CONST_I;
for (i = 0; i < NUM_SAVEDVERTEXSTATES_R; i++)
{
stateblock->contained_render_states[i] = SavedVertexStates_R[i];
}
stateblock->num_contained_render_states = NUM_SAVEDVERTEXSTATES_R;
for (i = 0; i < MAX_TEXTURES; ++i)
{
for (j = 0; j < NUM_SAVEDVERTEXSTATES_T; ++j)
{
stateblock->contained_tss_states[stateblock->num_contained_tss_states].stage = i;
stateblock->contained_tss_states[stateblock->num_contained_tss_states].state = SavedVertexStates_T[j];
++stateblock->num_contained_tss_states;
}
}
for (i = 0 ; i < MAX_COMBINED_SAMPLERS; ++i)
{
for (j = 0; j < NUM_SAVEDVERTEXSTATES_S; ++j)
{
stateblock->contained_sampler_states[stateblock->num_contained_sampler_states].stage = i;
stateblock->contained_sampler_states[stateblock->num_contained_sampler_states].state = SavedVertexStates_S[j];
++stateblock->num_contained_sampler_states;
}
}
stateblock_init_contained_states(stateblock);
for (i = 0; i < LIGHTMAP_SIZE; ++i)
{
......
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