Commit 6fc2799b authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Make wined3d_context_gl_set_draw_buffer() static.

parent 68cd6043
......@@ -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 ? &current_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)
......@@ -2503,24 +2521,6 @@ static void wined3d_context_gl_apply_draw_buffers(struct wined3d_context_gl *con
}
/* 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 ? &current_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)
{
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment