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 <ian.d.romanick@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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()");
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user