wined3d: Make wined3d_context_gl_set_draw_buffer() static.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
68cd60436c
commit
6fc2799bd0
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue