[Mesa-dev] [PATCH 07/13] meta: Use _mesa_CreateFramebuffers instead of _mesa_GenFramebuffers
Ian Romanick
idr at freedesktop.org
Thu Feb 11 06:13:17 UTC 2016
From: Ian Romanick <ian.d.romanick at intel.com>
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 <ian.d.romanick at intel.com>
---
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(-)
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 1222c9b..d5082f5 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 f25dd7b..f2c7404f 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 9369e84..3f52698 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 01c0152..81d6cf3 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);
--
2.5.0
More information about the mesa-dev
mailing list