summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-11-12 17:18:53 -0800
committerIan Romanick <[email protected]>2016-03-01 11:07:19 -0800
commit64aff35f8409f9a82b3b8a181b9b25e94a0e9fcb (patch)
treeafabe908d275c737af5430c39fbf9449853b74da /src/mesa/drivers/common
parent92266ff7a34ef4d16509650d714487a5c74fd27c (diff)
meta: Use _mesa_check_framebuffer_status instead of _mesa_CheckFramebufferStatus
sed -i -e 's/_mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER/_mesa_check_framebuffer_status(ctx, ctx->DrawBuffer/' \ -e 's/_mesa_CheckFramebufferStatus(GL_FRAMEBUFFER[^)]*/_mesa_check_framebuffer_status(ctx, ctx->DrawBuffer/' \ -e 's/_mesa_CheckFramebufferStatus(GL_READ_FRAMEBUFFER/_mesa_check_framebuffer_status(ctx, ctx->ReadBuffer/' \ $(grep -rl _mesa_CheckFramebufferStatus src/mesa/drivers) The second expression catches both GL_FRAMEBUFFER and GL_FRAMEBUFFER_EXT. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r--src/mesa/drivers/common/meta.c8
-rw-r--r--src/mesa/drivers/common/meta_copy_image.c4
-rw-r--r--src/mesa/drivers/common/meta_generate_mipmap.c4
-rw-r--r--src/mesa/drivers/common/meta_tex_subimage.c8
4 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index b62f0d4feef..c99a2203cf2 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -2821,7 +2821,7 @@ copytexsubimage_using_blit_framebuffer(struct gl_context *ctx, GLuint dims,
_mesa_DrawBuffer(GL_COLOR_ATTACHMENT0);
}
- status = _mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
+ status = _mesa_check_framebuffer_status(ctx, ctx->DrawBuffer);
if (status != GL_FRAMEBUFFER_COMPLETE)
goto out;
@@ -3068,7 +3068,7 @@ decompress_texture_image(struct gl_context *ctx,
if (width > decompress_fbo->Width || height > decompress_fbo->Height) {
_mesa_renderbuffer_storage(ctx, decompress_fbo->rb, rbFormat,
width, height, 0);
- status = _mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
+ status = _mesa_check_framebuffer_status(ctx, ctx->DrawBuffer);
if (status != GL_FRAMEBUFFER_COMPLETE) {
/* If the framebuffer isn't complete then we'll leave
* decompress_fbo->Width as zero so that it will fail again next time
@@ -3419,7 +3419,7 @@ cleartexsubimage_color(struct gl_context *ctx,
GL_COLOR_ATTACHMENT0,
texImage, zoffset);
- status = _mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
+ status = _mesa_check_framebuffer_status(ctx, ctx->DrawBuffer);
if (status != GL_FRAMEBUFFER_COMPLETE)
return false;
@@ -3472,7 +3472,7 @@ cleartexsubimage_depth_stencil(struct gl_context *ctx,
GL_STENCIL_ATTACHMENT,
texImage, zoffset);
- status = _mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
+ status = _mesa_check_framebuffer_status(ctx, ctx->DrawBuffer);
if (status != GL_FRAMEBUFFER_COMPLETE)
return false;
diff --git a/src/mesa/drivers/common/meta_copy_image.c b/src/mesa/drivers/common/meta_copy_image.c
index 67fd283a86c..02963dc4f7d 100644
--- a/src/mesa/drivers/common/meta_copy_image.c
+++ b/src/mesa/drivers/common/meta_copy_image.c
@@ -245,7 +245,7 @@ _mesa_meta_CopyImageSubData_uncompressed(struct gl_context *ctx,
src_renderbuffer);
}
- status = _mesa_CheckFramebufferStatus(GL_READ_FRAMEBUFFER);
+ status = _mesa_check_framebuffer_status(ctx, ctx->ReadBuffer);
if (status != GL_FRAMEBUFFER_COMPLETE)
goto meta_end;
@@ -257,7 +257,7 @@ _mesa_meta_CopyImageSubData_uncompressed(struct gl_context *ctx,
dst_tex_image, dst_z);
}
- status = _mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
+ status = _mesa_check_framebuffer_status(ctx, ctx->DrawBuffer);
if (status != GL_FRAMEBUFFER_COMPLETE)
goto meta_end;
diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c
index d7db0909573..9369e845c17 100644
--- a/src/mesa/drivers/common/meta_generate_mipmap.c
+++ b/src/mesa/drivers/common/meta_generate_mipmap.c
@@ -116,7 +116,7 @@ fallback_required(struct gl_context *ctx, GLenum target,
_mesa_meta_framebuffer_texture_image(ctx, ctx->DrawBuffer,
GL_COLOR_ATTACHMENT0, baseImage, 0);
- status = _mesa_CheckFramebufferStatus(fbo_target);
+ status = _mesa_check_framebuffer_status(ctx, ctx->DrawBuffer);
_mesa_BindFramebuffer(fbo_target, fboSave);
@@ -360,7 +360,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target,
layer);
/* sanity check */
- if (_mesa_CheckFramebufferStatus(GL_FRAMEBUFFER) !=
+ if (_mesa_check_framebuffer_status(ctx, ctx->DrawBuffer) !=
GL_FRAMEBUFFER_COMPLETE) {
_mesa_problem(ctx, "Unexpected incomplete framebuffer in "
"_mesa_meta_GenerateMipmap()");
diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common/meta_tex_subimage.c
index 9e8210dedc4..01c0152c551 100644
--- a/src/mesa/drivers/common/meta_tex_subimage.c
+++ b/src/mesa/drivers/common/meta_tex_subimage.c
@@ -243,7 +243,7 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
GL_COLOR_ATTACHMENT0,
pbo_tex_image, 0);
/* If this passes on the first layer it should pass on the others */
- status = _mesa_CheckFramebufferStatus(GL_READ_FRAMEBUFFER);
+ status = _mesa_check_framebuffer_status(ctx, ctx->ReadBuffer);
if (status != GL_FRAMEBUFFER_COMPLETE)
goto fail;
@@ -251,7 +251,7 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
GL_COLOR_ATTACHMENT0,
tex_image, zoffset);
/* If this passes on the first layer it should pass on the others */
- status = _mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
+ status = _mesa_check_framebuffer_status(ctx, ctx->DrawBuffer);
if (status != GL_FRAMEBUFFER_COMPLETE)
goto fail;
@@ -385,7 +385,7 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,
GL_COLOR_ATTACHMENT0,
tex_image, zoffset);
/* If this passes on the first layer it should pass on the others */
- status = _mesa_CheckFramebufferStatus(GL_READ_FRAMEBUFFER);
+ status = _mesa_check_framebuffer_status(ctx, ctx->ReadBuffer);
if (status != GL_FRAMEBUFFER_COMPLETE)
goto fail;
} else {
@@ -397,7 +397,7 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,
GL_COLOR_ATTACHMENT0,
pbo_tex_image, 0);
/* If this passes on the first layer it should pass on the others */
- status = _mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
+ status = _mesa_check_framebuffer_status(ctx, ctx->DrawBuffer);
if (status != GL_FRAMEBUFFER_COMPLETE)
goto fail;