From: Józef Kucia jkucia@codeweavers.com
D3D_MAX_SIMULTANEOUS_RENDERTARGETS is defined in d3d9types.h.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/d3d9/d3d9_private.h | 3 +-- dlls/d3d9/device.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/d3d9/d3d9_private.h b/dlls/d3d9/d3d9_private.h index ee385d9c939c..ba19e5fb08fe 100644 --- a/dlls/d3d9/d3d9_private.h +++ b/dlls/d3d9/d3d9_private.h @@ -42,7 +42,6 @@
#define D3D9_MAX_VERTEX_SHADER_CONSTANTF 256 #define D3D9_MAX_TEXTURE_UNITS 20 -#define D3D9_MAX_SIMULTANEOUS_RENDERTARGETS 4
#define D3DPRESENTFLAGS_MASK 0x00000fffu
@@ -103,7 +102,7 @@ struct d3d9_device UINT index_buffer_pos;
struct d3d9_texture *textures[D3D9_MAX_TEXTURE_UNITS]; - struct d3d9_surface *render_targets[D3D9_MAX_SIMULTANEOUS_RENDERTARGETS]; + struct d3d9_surface *render_targets[D3D_MAX_SIMULTANEOUS_RENDERTARGETS];
LONG device_state; BOOL in_destruction; diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 1c9a625223c6..e8798a746ccd 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -453,7 +453,7 @@ void d3dcaps_from_wined3dcaps(D3DCAPS9 *caps, const WINED3DCAPS *wined3d_caps) D3DPTEXTURECAPS_CUBEMAP_POW2 | D3DPTEXTURECAPS_VOLUMEMAP_POW2| D3DPTEXTURECAPS_NOPROJECTEDBUMPENV;
caps->MaxVertexShaderConst = min(D3D9_MAX_VERTEX_SHADER_CONSTANTF, caps->MaxVertexShaderConst); - caps->NumSimultaneousRTs = min(D3D9_MAX_SIMULTANEOUS_RENDERTARGETS, caps->NumSimultaneousRTs); + caps->NumSimultaneousRTs = min(D3D_MAX_SIMULTANEOUS_RENDERTARGETS, caps->NumSimultaneousRTs);
if (caps->PixelShaderVersion > 3) { @@ -1784,7 +1784,7 @@ static HRESULT WINAPI d3d9_device_SetRenderTarget(IDirect3DDevice9Ex *iface, DWO
TRACE("iface %p, idx %u, surface %p.\n", iface, idx, surface);
- if (idx >= D3D9_MAX_SIMULTANEOUS_RENDERTARGETS) + if (idx >= D3D_MAX_SIMULTANEOUS_RENDERTARGETS) { WARN("Invalid index %u specified.\n", idx); return D3DERR_INVALIDCALL; @@ -1825,7 +1825,7 @@ static HRESULT WINAPI d3d9_device_GetRenderTarget(IDirect3DDevice9Ex *iface, DWO if (!surface) return D3DERR_INVALIDCALL;
- if (idx >= D3D9_MAX_SIMULTANEOUS_RENDERTARGETS) + if (idx >= D3D_MAX_SIMULTANEOUS_RENDERTARGETS) { WARN("Invalid index %u specified.\n", idx); return D3DERR_INVALIDCALL;