aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common/meta_generate_mipmap.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-11-12 17:05:27 -0800
committerIan Romanick <[email protected]>2016-03-01 11:07:19 -0800
commitf69c743069b65fa58196875a0c5a74e4160acc86 (patch)
tree407d76b654bef1b988e365ed1d0696d8f3fc019c /src/mesa/drivers/common/meta_generate_mipmap.c
parentac222626adfc7a03bf537deba66bad5e57b2c91d (diff)
meta: Convert _mesa_meta_bind_fbo_image to take a gl_framebuffer instead of a GL API handle
Also change the name of the function to _mesa_meta_framebuffer_texture_image. The function is basically a wrapper around _mesa_framebuffer_texture (which is used to implement glFramebufferTexture1D and friends), so it makes sense for it's name to be similar to that. The next patch will clean _mesa_meta_framebuffer_texture_image up considerably. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta_generate_mipmap.c')
-rw-r--r--src/mesa/drivers/common/meta_generate_mipmap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c
index 27435b2b722..d7db0909573 100644
--- a/src/mesa/drivers/common/meta_generate_mipmap.c
+++ b/src/mesa/drivers/common/meta_generate_mipmap.c
@@ -113,7 +113,8 @@ fallback_required(struct gl_context *ctx, GLenum target,
_mesa_GenFramebuffers(1, &mipmap->FBO);
_mesa_BindFramebuffer(fbo_target, mipmap->FBO);
- _mesa_meta_bind_fbo_image(fbo_target, GL_COLOR_ATTACHMENT0, baseImage, 0);
+ _mesa_meta_framebuffer_texture_image(ctx, ctx->DrawBuffer,
+ GL_COLOR_ATTACHMENT0, baseImage, 0);
status = _mesa_CheckFramebufferStatus(fbo_target);
@@ -354,7 +355,9 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
_mesa_buffer_data(ctx, mipmap->buf_obj, GL_NONE, sizeof(verts), verts,
GL_DYNAMIC_DRAW, __func__);
- _mesa_meta_bind_fbo_image(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, dstImage, layer);
+ _mesa_meta_framebuffer_texture_image(ctx, ctx->DrawBuffer,
+ GL_COLOR_ATTACHMENT0, dstImage,
+ layer);
/* sanity check */
if (_mesa_CheckFramebufferStatus(GL_FRAMEBUFFER) !=