Module: wine Branch: master Commit: d66c05ce1de614febd922ad507d586cf09e78b7c URL: http://source.winehq.org/git/wine.git/?a=commit;h=d66c05ce1de614febd922ad507...
Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Jul 10 13:38:35 2008 -0500
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
---
dlls/wined3d/device.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 131e1b7..b3db3b7 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -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;