Commit d66c05ce authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Fix a copy and paste bug.

This happened to work because most cards have the same amount of pshader and vshader constants, but for some reason this doesn't hold true on this macbook pro here, which lead to a crash due to heap corruption
parent 1219e3d4
......@@ -459,11 +459,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateStateBlock(IWineD3DDevice* iface,
object->changed.pixelShader = TRUE;
/* Pixel Shader Constants */
for (i = 0; i < GL_LIMITS(vshader_constantsF); ++i) {
for (i = 0; i < GL_LIMITS(pshader_constantsF); ++i) {
object->contained_ps_consts_f[i] = i;
object->changed.pixelShaderConstantsF[i] = TRUE;
}
object->num_contained_ps_consts_f = GL_LIMITS(vshader_constantsF);
object->num_contained_ps_consts_f = GL_LIMITS(pshader_constantsF);
for (i = 0; i < MAX_CONST_B; ++i) {
object->contained_ps_consts_b[i] = i;
object->changed.pixelShaderConstantsB[i] = TRUE;
......
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