diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 67680ac7f13..774d71386b5 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1368,7 +1368,7 @@ HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UI TRACE("device %p, stream_idx %u, buffer %p, offset %u, stride %u.\n", device, stream_idx, buffer, offset, stride); - if (stream_idx >= MAX_STREAMS) + if (stream_idx >= WINED3D_MAX_STREAMS) { WARN("Stream index %u out of range.\n", stream_idx); return WINED3DERR_INVALIDCALL; @@ -1423,7 +1423,7 @@ HRESULT CDECL wined3d_device_get_stream_source(const struct wined3d_device *devi TRACE("device %p, stream_idx %u, buffer %p, offset %p, stride %p.\n", device, stream_idx, buffer, offset, stride); - if (stream_idx >= MAX_STREAMS) + if (stream_idx >= WINED3D_MAX_STREAMS) { WARN("Stream index %u out of range.\n", stream_idx); return WINED3DERR_INVALIDCALL; @@ -5249,7 +5249,7 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso break; case WINED3D_RTYPE_BUFFER: - for (i = 0; i < MAX_STREAMS; ++i) + for (i = 0; i < WINED3D_MAX_STREAMS; ++i) { if (&device->state.streams[i].buffer->resource == resource) { diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 827d4f6df2a..0c70f046eb2 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2210,7 +2210,7 @@ HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapte caps->MaxPrimitiveCount = 0x555555; /* Taken from an AMD Radeon HD 5700 (Evergreen) GPU. */ caps->MaxVertexIndex = 0xffffff; /* Taken from an AMD Radeon HD 5700 (Evergreen) GPU. */ - caps->MaxStreams = MAX_STREAMS; + caps->MaxStreams = WINED3D_MAX_STREAMS; caps->MaxStreamStride = 1024; /* d3d9.dll sets D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES here because StretchRects is implemented in d3d9 */ diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index cd722093912..3dfd368780b 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -457,7 +457,7 @@ void state_unbind_resources(struct wined3d_state *state) } } - for (i = 0; i < MAX_STREAMS; ++i) + for (i = 0; i < WINED3D_MAX_STREAMS; ++i) { if ((buffer = state->streams[i].buffer)) { @@ -535,7 +535,7 @@ void wined3d_stateblock_state_cleanup(struct wined3d_stateblock_state *state) wined3d_vertex_declaration_decref(decl); } - for (i = 0; i < MAX_STREAMS; ++i) + for (i = 0; i < WINED3D_MAX_STREAMS; ++i) { if ((buffer = state->streams[i].buffer)) { @@ -1480,7 +1480,7 @@ static void state_init_default(struct wined3d_state *state, const struct wined3d state->blend_factor.b = 1.0f; state->blend_factor.a = 1.0f; - for (i = 0; i < MAX_STREAMS; ++i) + for (i = 0; i < WINED3D_MAX_STREAMS; ++i) state->streams[i].frequency = 1; } @@ -1531,7 +1531,7 @@ static void stateblock_state_init_default(struct wined3d_stateblock_state *state state->blend_factor.b = 1.0f; state->blend_factor.a = 1.0f; - for (i = 0; i < MAX_STREAMS; ++i) + for (i = 0; i < WINED3D_MAX_STREAMS; ++i) state->streams[i].frequency = 1; } diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index 863366b9243..cd8bb5e4233 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -217,7 +217,7 @@ static HRESULT vertexdeclaration_init(struct wined3d_vertex_declaration *declara /* Find the streams used in the declaration. The vertex buffers have * to be loaded when drawing, but filter tesselation pseudo streams. */ - if (e->input_slot >= MAX_STREAMS) + if (e->input_slot >= WINED3D_MAX_STREAMS) continue; if (!(e->format->flags[WINED3D_GL_RES_TYPE_BUFFER] & WINED3DFMT_FLAG_VERTEX_ATTRIBUTE)) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index a8ba1d074d4..76aedd5c679 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -258,7 +258,7 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup } /* Device caps */ -#define MAX_STREAMS 16 +#define WINED3D_MAX_STREAMS 16 #define MAX_TEXTURES 8 #define MAX_FRAGMENT_SAMPLERS 16 #define MAX_VERTEX_SAMPLERS 4 @@ -2909,7 +2909,7 @@ struct wined3d_state struct wined3d_vertex_declaration *vertex_declaration; struct wined3d_stream_output stream_output[WINED3D_MAX_STREAM_OUTPUT_BUFFERS]; - struct wined3d_stream_state streams[MAX_STREAMS + 1 /* tesselated pseudo-stream */]; + struct wined3d_stream_state streams[WINED3D_MAX_STREAMS + 1 /* tesselated pseudo-stream */]; struct wined3d_buffer *index_buffer; enum wined3d_format_id index_format; unsigned int index_offset; @@ -2978,7 +2978,7 @@ struct wined3d_dummy_textures struct wined3d_stateblock_state { struct wined3d_vertex_declaration *vertex_declaration; - struct wined3d_stream_state streams[MAX_STREAMS + 1]; + struct wined3d_stream_state streams[WINED3D_MAX_STREAMS + 1]; struct wined3d_buffer *index_buffer; enum wined3d_format_id index_format; int base_vertex_index; @@ -3566,8 +3566,8 @@ struct wined3d_vertex_declaration struct wined3d_saved_states { DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1]; - WORD streamSource; /* MAX_STREAMS, 16 */ - WORD streamFreq; /* MAX_STREAMS, 16 */ + WORD streamSource; /* WINED3D_MAX_STREAMS, 16 */ + WORD streamFreq; /* WINED3D_MAX_STREAMS, 16 */ DWORD renderState[(WINEHIGHEST_RENDER_STATE >> 5) + 1]; DWORD textureState[MAX_TEXTURES]; /* WINED3D_HIGHEST_TEXTURE_STATE + 1, 18 */ WORD samplerState[MAX_COMBINED_SAMPLERS]; /* WINED3D_HIGHEST_SAMPLER_STATE + 1, 14 */