Commit 7d5f9e42 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Rename wined3d_context_gl_apply_fbo_state_blit() function.

To wined3d_context_gl_apply_fbo_state_explicit(). It's not really related to blitting in principle; what it does is attaching specific textures to the FBO instead of the d3d render targets, which was the "original" use of FBOs in wined3d. BTW even that original use case (currently handled by context_state_fb()) is not using render_targets[] directly anymore and we end up kind of abusing the blit_targets[] arrays in struct wined3d_context_gl. Maybe we could rename that array as well.
parent 4c93750e
......@@ -850,7 +850,7 @@ static void wined3d_context_gl_apply_fbo_state(struct wined3d_context_gl *contex
}
/* Context activation is done by the caller. */
void wined3d_context_gl_apply_fbo_state_blit(struct wined3d_context_gl *context_gl, GLenum target,
void wined3d_context_gl_apply_fbo_state_explicit(struct wined3d_context_gl *context_gl, GLenum target,
struct wined3d_resource *rt, unsigned int rt_sub_resource_idx,
struct wined3d_resource *ds, unsigned int ds_sub_resource_idx, uint32_t location)
{
......@@ -3611,10 +3611,10 @@ void context_gl_apply_texture_draw_state(struct wined3d_context_gl *context_gl,
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
if (format->depth_size || format->stencil_size)
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER, NULL,
wined3d_context_gl_apply_fbo_state_explicit(context_gl, GL_DRAW_FRAMEBUFFER, NULL,
0, &texture->resource, sub_resource_idx, location);
else
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_DRAW_FRAMEBUFFER, &texture->resource,
wined3d_context_gl_apply_fbo_state_explicit(context_gl, GL_DRAW_FRAMEBUFFER, &texture->resource,
sub_resource_idx, NULL, 0, location);
}
......
......@@ -374,7 +374,7 @@ void texture2d_read_from_framebuffer(struct wined3d_texture *texture, unsigned i
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_READ_FRAMEBUFFER,
wined3d_context_gl_apply_fbo_state_explicit(context_gl, GL_READ_FRAMEBUFFER,
resource, sub_resource_idx, NULL, 0, src_location);
}
......
......@@ -531,7 +531,7 @@ static void texture2d_blt_fbo(struct wined3d_device *device, struct wined3d_cont
buffer = GL_COLOR_ATTACHMENT0;
}
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_READ_FRAMEBUFFER,
wined3d_context_gl_apply_fbo_state_explicit(context_gl, GL_READ_FRAMEBUFFER,
&src_texture->resource, src_sub_resource_idx, NULL, 0, src_location);
gl_info->gl_ops.gl.p_glReadBuffer(buffer);
checkGLcall("glReadBuffer()");
......@@ -632,7 +632,7 @@ static void texture2d_depth_blt_fbo(const struct wined3d_device *device, struct
else
wined3d_texture_prepare_location(dst_texture, dst_sub_resource_idx, context, dst_location);
wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_READ_FRAMEBUFFER, NULL, 0,
wined3d_context_gl_apply_fbo_state_explicit(context_gl, GL_READ_FRAMEBUFFER, NULL, 0,
&src_texture->resource, src_sub_resource_idx, src_location);
wined3d_context_gl_check_fbo_status(context_gl, GL_READ_FRAMEBUFFER);
......
......@@ -734,7 +734,7 @@ GLuint wined3d_context_gl_allocate_vram_chunk_buffer(struct wined3d_context_gl *
void wined3d_context_gl_apply_blit_state(struct wined3d_context_gl *context_gl, const struct wined3d_device *device);
BOOL wined3d_context_gl_apply_clear_state(struct wined3d_context_gl *context_gl, const struct wined3d_state *state,
unsigned int rt_count, const struct wined3d_fb_state *fb);
void wined3d_context_gl_apply_fbo_state_blit(struct wined3d_context_gl *context_gl, GLenum target,
void wined3d_context_gl_apply_fbo_state_explicit(struct wined3d_context_gl *context_gl, GLenum target,
struct wined3d_resource *rt, unsigned int rt_sub_resource_idx,
struct wined3d_resource *ds, unsigned int ds_sub_resource_idx, uint32_t location);
void wined3d_context_gl_apply_ffp_blit_state(struct wined3d_context_gl *context_gl,
......
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