From 7c254f02008159b4e042cd6c9d33a2fc8c92e1ea Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 13 Nov 2015 11:06:51 -0800 Subject: meta: Use _mesa_CreateFramebuffers instead of _mesa_GenFramebuffers This enables later patches that will stop calling _mesa_GenFramebuffers or _mesa_CreateFramebuffers which pollute the framebuffer namespace. For framebuffers, the Bind call is still necessary. sed -i -e 's/_mesa_GenFramebuffers/_mesa_CreateFramebuffers/' \ src/mesa/drivers/common/*.c Signed-off-by: Ian Romanick Reviewed-by: Topi Pohjolainen --- src/mesa/drivers/common/meta.c | 6 +++--- src/mesa/drivers/common/meta_copy_image.c | 2 +- src/mesa/drivers/common/meta_generate_mipmap.c | 2 +- src/mesa/drivers/common/meta_tex_subimage.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 1222c9bbe73..d5082f536c1 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -2794,7 +2794,7 @@ copytexsubimage_using_blit_framebuffer(struct gl_context *ctx, GLuint dims, _mesa_meta_begin(ctx, MESA_META_ALL & ~MESA_META_DRAW_BUFFERS); - _mesa_GenFramebuffers(1, &fbo); + _mesa_CreateFramebuffers(1, &fbo); _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo); if (rb->_BaseFormat == GL_DEPTH_STENCIL || @@ -3054,7 +3054,7 @@ decompress_texture_image(struct gl_context *ctx, decompress_fbo->rb->RefCount = 1; - _mesa_GenFramebuffers(1, &decompress_fbo->FBO); + _mesa_CreateFramebuffers(1, &decompress_fbo->FBO); _mesa_BindFramebuffer(GL_FRAMEBUFFER_EXT, decompress_fbo->FBO); _mesa_framebuffer_renderbuffer(ctx, ctx->DrawBuffer, GL_COLOR_ATTACHMENT0, decompress_fbo->rb); @@ -3512,7 +3512,7 @@ cleartexsubimage_for_zoffset(struct gl_context *ctx, GLuint fbo; bool success; - _mesa_GenFramebuffers(1, &fbo); + _mesa_CreateFramebuffers(1, &fbo); _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo); switch(texImage->_BaseFormat) { diff --git a/src/mesa/drivers/common/meta_copy_image.c b/src/mesa/drivers/common/meta_copy_image.c index 02963dc4f7d..ce7597f1637 100644 --- a/src/mesa/drivers/common/meta_copy_image.c +++ b/src/mesa/drivers/common/meta_copy_image.c @@ -210,7 +210,7 @@ _mesa_meta_CopyImageSubData_uncompressed(struct gl_context *ctx, /* We really only need to stash the bound framebuffers and scissor. */ _mesa_meta_begin(ctx, MESA_META_SCISSOR); - _mesa_GenFramebuffers(2, fbos); + _mesa_CreateFramebuffers(2, fbos); _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, fbos[0]); _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fbos[1]); diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c index 9369e845c17..3f52698b3a2 100644 --- a/src/mesa/drivers/common/meta_generate_mipmap.c +++ b/src/mesa/drivers/common/meta_generate_mipmap.c @@ -110,7 +110,7 @@ fallback_required(struct gl_context *ctx, GLenum target, * Test that we can actually render in the texture's format. */ if (!mipmap->FBO) - _mesa_GenFramebuffers(1, &mipmap->FBO); + _mesa_CreateFramebuffers(1, &mipmap->FBO); _mesa_BindFramebuffer(fbo_target, mipmap->FBO); _mesa_meta_framebuffer_texture_image(ctx, ctx->DrawBuffer, diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c index 01c0152c551..81d6cf35a87 100644 --- a/src/mesa/drivers/common/meta_tex_subimage.c +++ b/src/mesa/drivers/common/meta_tex_subimage.c @@ -225,7 +225,7 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims, _mesa_meta_begin(ctx, ~(MESA_META_PIXEL_TRANSFER | MESA_META_PIXEL_STORE)); - _mesa_GenFramebuffers(2, fbos); + _mesa_CreateFramebuffers(2, fbos); _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, fbos[0]); _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fbos[1]); @@ -363,7 +363,7 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims, if (ctx->Extensions.ARB_color_buffer_float) _mesa_ClampColor(GL_CLAMP_FRAGMENT_COLOR, GL_FALSE); - _mesa_GenFramebuffers(2, fbos); + _mesa_CreateFramebuffers(2, fbos); if (tex_image && tex_image->TexObject->Target == GL_TEXTURE_1D_ARRAY) { assert(depth == 1); -- cgit v1.2.3