Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- The new WINED3D_MAX_RENDER_TARGETS defines the same thing.
dlls/wined3d/adapter_gl.c | 2 +- dlls/wined3d/context.c | 2 +- dlls/wined3d/glsl_shader.c | 2 +- dlls/wined3d/wined3d_private.h | 11 +++++------ 4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index 2fd061b74a8..e269bf81381 100644 --- a/dlls/wined3d/adapter_gl.c +++ b/dlls/wined3d/adapter_gl.c @@ -2993,7 +2993,7 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info) if (gl_info->supported[ARB_DRAW_BUFFERS] && wined3d_settings.offscreen_rendering_mode == ORM_FBO) { gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &gl_max); - gl_info->limits.buffers = min(MAX_RENDER_TARGET_VIEWS, gl_max); + gl_info->limits.buffers = min(WINED3D_MAX_RENDER_TARGETS, gl_max); TRACE("Max draw buffers: %u.\n", gl_max); } if (gl_info->supported[ARB_MULTITEXTURE]) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index fed4f75ec0e..c6a1d762673 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -2755,7 +2755,7 @@ static inline GLenum draw_buffer_from_rt_mask(DWORD rt_mask) static void wined3d_context_gl_apply_draw_buffers(struct wined3d_context_gl *context_gl, uint32_t rt_mask) { const struct wined3d_gl_info *gl_info = context_gl->gl_info; - GLenum draw_buffers[MAX_RENDER_TARGET_VIEWS]; + GLenum draw_buffers[WINED3D_MAX_RENDER_TARGETS];
if (!rt_mask) { diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 7a079de85c7..e188671f0d2 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -10390,7 +10390,7 @@ static void set_glsl_shader_program(const struct wined3d_context_gl *context_gl,
if (!use_legacy_fragment_output(gl_info)) { - for (i = 0; i < MAX_RENDER_TARGET_VIEWS; ++i) + for (i = 0; i < WINED3D_MAX_RENDER_TARGETS; ++i) { string_buffer_sprintf(tmp_name, "color_out%u", i); if (state->blend_state && state->blend_state->dual_source) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 8740c532a59..96f8c5bc787 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -284,7 +284,6 @@ static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup #define MAX_CONSTANT_BUFFERS 15 #define MAX_SAMPLER_OBJECTS 16 #define MAX_SHADER_RESOURCE_VIEWS 128 -#define MAX_RENDER_TARGET_VIEWS 8 #define MAX_UNORDERED_ACCESS_VIEWS 8 #define MAX_TGSM_REGISTERS 8192 #define MAX_VERTEX_BLENDS 4 @@ -1393,7 +1392,7 @@ struct ps_compile_args DWORD flatshading : 1; DWORD alpha_test_func : 3; DWORD render_offscreen : 1; - DWORD rt_alpha_swizzle : 8; /* MAX_RENDER_TARGET_VIEWS, 8 */ + DWORD rt_alpha_swizzle : 8; /* WINED3D_MAX_RENDER_TARGETS, 8 */ DWORD dual_source_blend : 1; DWORD padding : 17; }; @@ -1917,7 +1916,7 @@ struct wined3d_rendertarget_info
struct wined3d_fb_state { - struct wined3d_rendertarget_view *render_targets[MAX_RENDER_TARGET_VIEWS]; + struct wined3d_rendertarget_view *render_targets[WINED3D_MAX_RENDER_TARGETS]; struct wined3d_rendertarget_view *depth_stencil; };
@@ -2045,7 +2044,7 @@ struct wined3d_context_gl struct fbo_entry *current_fbo; GLuint fbo_read_binding; GLuint fbo_draw_binding; - struct wined3d_rendertarget_info blit_targets[MAX_RENDER_TARGET_VIEWS]; + struct wined3d_rendertarget_info blit_targets[WINED3D_MAX_RENDER_TARGETS]; uint32_t draw_buffers_mask; /* Enabled draw buffers, 31 max. */
/* Queries. */ @@ -3858,7 +3857,7 @@ struct fbo_entry struct wined3d_fbo_entry_key { DWORD rb_namespace; - struct wined3d_fbo_resource objects[MAX_RENDER_TARGET_VIEWS + 1]; + struct wined3d_fbo_resource objects[WINED3D_MAX_RENDER_TARGETS + 1]; } key; };
@@ -5315,7 +5314,7 @@ static inline BOOL wined3d_resource_check_fbo_attached(const struct wined3d_stat if (!(resource->bind_flags & WINED3D_BIND_RENDER_TARGET)) return FALSE;
- for (i = 0; i < MAX_RENDER_TARGET_VIEWS; ++i) + for (i = 0; i < WINED3D_MAX_RENDER_TARGETS; ++i) if (rts[i] && rts[i]->resource == resource) return TRUE;