Zebediah Figura : wined3d: Make wined3d_context_gl_set_draw_buffer() static.
Alexandre Julliard
julliard at winehq.org
Wed Apr 20 16:49:49 CDT 2022
Module: wine
Branch: master
Commit: 6fc2799bd02add497ac0770b41799372bf4c119a
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6fc2799bd02add497ac0770b41799372bf4c119a
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Tue Apr 19 20:20:38 2022 -0500
wined3d: Make wined3d_context_gl_set_draw_buffer() static.
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/context_gl.c | 36 ++++++++++++++++++------------------
dlls/wined3d/wined3d_private.h | 1 -
2 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index dd4204067bc..45c1062b3ec 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -466,6 +466,24 @@ static inline DWORD context_generate_rt_mask_from_resource(struct wined3d_resour
return (1u << 31) | wined3d_texture_get_gl_buffer(texture_from_resource(resource));
}
+/* Context activation is done by the caller. */
+static void wined3d_context_gl_set_draw_buffer(struct wined3d_context_gl *context_gl, GLenum buffer)
+{
+ const struct wined3d_gl_info *gl_info = context_gl->gl_info;
+ struct fbo_entry *current_fbo = context_gl->current_fbo;
+ uint32_t new_mask = context_generate_rt_mask(buffer);
+ uint32_t *current_mask;
+
+ current_mask = current_fbo ? ¤t_fbo->rt_mask : &context_gl->draw_buffers_mask;
+ if (new_mask == *current_mask)
+ return;
+
+ gl_info->gl_ops.gl.p_glDrawBuffer(buffer);
+ checkGLcall("glDrawBuffer()");
+
+ *current_mask = new_mask;
+}
+
static inline void wined3d_context_gl_set_fbo_key_for_render_target(const struct wined3d_context_gl *context_gl,
struct wined3d_fbo_entry_key *key, unsigned int idx, const struct wined3d_rendertarget_info *render_target,
DWORD location)
@@ -2502,24 +2520,6 @@ static void wined3d_context_gl_apply_draw_buffers(struct wined3d_context_gl *con
checkGLcall("apply draw buffers");
}
-/* Context activation is done by the caller. */
-void wined3d_context_gl_set_draw_buffer(struct wined3d_context_gl *context_gl, GLenum buffer)
-{
- const struct wined3d_gl_info *gl_info = context_gl->gl_info;
- struct fbo_entry *current_fbo = context_gl->current_fbo;
- uint32_t new_mask = context_generate_rt_mask(buffer);
- uint32_t *current_mask;
-
- current_mask = current_fbo ? ¤t_fbo->rt_mask : &context_gl->draw_buffers_mask;
- if (new_mask == *current_mask)
- return;
-
- gl_info->gl_ops.gl.p_glDrawBuffer(buffer);
- checkGLcall("glDrawBuffer()");
-
- *current_mask = new_mask;
-}
-
/* Context activation is done by the caller. */
void wined3d_context_gl_active_texture(struct wined3d_context_gl *context_gl,
const struct wined3d_gl_info *gl_info, unsigned int unit)
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b9ca990932d..0ddad7ee5ec 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2383,7 +2383,6 @@ void *wined3d_context_gl_map_bo_address(struct wined3d_context_gl *context_gl,
struct wined3d_context_gl *wined3d_context_gl_reacquire(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
void wined3d_context_gl_release(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
BOOL wined3d_context_gl_set_current(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
-void wined3d_context_gl_set_draw_buffer(struct wined3d_context_gl *context_gl, GLenum buffer) DECLSPEC_HIDDEN;
void wined3d_context_gl_submit_command_fence(struct wined3d_context_gl *context_gl) DECLSPEC_HIDDEN;
void wined3d_context_gl_texture_update(struct wined3d_context_gl *context_gl,
const struct wined3d_texture_gl *texture_gl) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list