summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common/meta.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-11-13 11:12:57 -0800
committerIan Romanick <[email protected]>2016-03-01 11:07:20 -0800
commitec5757f9c93c6749aee39a10d6edfe4a7389ef5e (patch)
tree83223026fde1141db6be7476b9727bb33c60ebc0 /src/mesa/drivers/common/meta.c
parent7c254f02008159b4e042cd6c9d33a2fc8c92e1ea (diff)
meta: Use _mesa_bind_framebuffers instead of _mesa_BindFramebuffer
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta.c')
-rw-r--r--src/mesa/drivers/common/meta.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index d5082f536c1..6a133c9b5e6 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -2785,6 +2785,7 @@ copytexsubimage_using_blit_framebuffer(struct gl_context *ctx, GLuint dims,
GLsizei width, GLsizei height)
{
GLuint fbo;
+ struct gl_framebuffer *drawFb;
bool success = false;
GLbitfield mask;
GLenum status;
@@ -2795,7 +2796,10 @@ copytexsubimage_using_blit_framebuffer(struct gl_context *ctx, GLuint dims,
_mesa_meta_begin(ctx, MESA_META_ALL & ~MESA_META_DRAW_BUFFERS);
_mesa_CreateFramebuffers(1, &fbo);
- _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);
+ drawFb = _mesa_lookup_framebuffer(ctx, fbo);
+ assert(drawFb != NULL && drawFb->Name == fbo);
+
+ _mesa_bind_framebuffers(ctx, drawFb, ctx->ReadBuffer);
if (rb->_BaseFormat == GL_DEPTH_STENCIL ||
rb->_BaseFormat == GL_DEPTH_COMPONENT) {
@@ -3510,10 +3514,15 @@ cleartexsubimage_for_zoffset(struct gl_context *ctx,
const GLvoid *clearValue)
{
GLuint fbo;
+ struct gl_framebuffer *drawFb;
bool success;
_mesa_CreateFramebuffers(1, &fbo);
- _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);
+
+ drawFb = _mesa_lookup_framebuffer(ctx, fbo);
+ assert(drawFb != NULL && drawFb->Name == fbo);
+
+ _mesa_bind_framebuffers(ctx, drawFb, ctx->ReadBuffer);
switch(texImage->_BaseFormat) {
case GL_DEPTH_STENCIL: