Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3d8/d3d8_private.h | 1 + dlls/d3d8/device.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index f67841b4b13..488035c7f82 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -40,6 +40,7 @@ #define D3DPRESENTFLAGS_MASK 0x00000fffu
#define D3D8_MAX_VERTEX_SHADER_CONSTANTF 256 +#define D3D8_MAX_PIXEL_SHADER_CONSTANTF 8 #define D3D8_MAX_STREAMS 16
#define D3DFMT_RESZ MAKEFOURCC('R','E','S','Z') diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 45b158314ed..d6253a4a2bf 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -3295,7 +3295,8 @@ static HRESULT WINAPI d3d8_device_GetPixelShaderConstant(IDirect3DDevice8 *iface
TRACE("iface %p, start_idx %u, constants %p, count %u.\n", iface, start_idx, constants, count);
- if (!constants || start_idx >= WINED3D_MAX_PS_CONSTS_F || count > WINED3D_MAX_PS_CONSTS_F - start_idx) + if (!constants || start_idx >= D3D8_MAX_PIXEL_SHADER_CONSTANTF + || count > D3D8_MAX_PIXEL_SHADER_CONSTANTF - start_idx) return WINED3DERR_INVALIDCALL;
wined3d_mutex_lock();