summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/common/meta.h1
-rw-r--r--src/mesa/drivers/common/meta_blit.c15
2 files changed, 7 insertions, 9 deletions
diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h
index 16dd8e293d4..128c342fba1 100644
--- a/src/mesa/drivers/common/meta.h
+++ b/src/mesa/drivers/common/meta.h
@@ -465,7 +465,6 @@ _mesa_meta_fb_tex_blit_end(struct gl_context *ctx, GLenum target,
extern GLboolean
_mesa_meta_bind_rb_as_tex_image(struct gl_context *ctx,
struct gl_renderbuffer *rb,
- GLuint *tex,
struct gl_texture_object **texObj);
struct gl_sampler_object *
diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index f7e29bcfc6f..4e660d2a571 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -640,10 +640,11 @@ blitframebuffer_texture(struct gl_context *ctx,
srcLevel = readAtt->TextureLevel;
texObj = readAtt->Texture;
} else if (!readAtt->Texture && ctx->Driver.BindRenderbufferTexImage) {
- if (!_mesa_meta_bind_rb_as_tex_image(ctx, rb, &fb_tex_blit.tempTex,
- &texObj))
+ if (!_mesa_meta_bind_rb_as_tex_image(ctx, rb, &texObj))
return false;
+ fb_tex_blit.tempTex = texObj->Name;
+
srcLevel = 0;
if (_mesa_is_winsys_fbo(readFb)) {
GLint temp = srcY0;
@@ -884,7 +885,6 @@ _mesa_meta_fb_tex_blit_end(struct gl_context *ctx, GLenum target,
GLboolean
_mesa_meta_bind_rb_as_tex_image(struct gl_context *ctx,
struct gl_renderbuffer *rb,
- GLuint *tex,
struct gl_texture_object **texObj)
{
struct gl_texture_image *texImage;
@@ -897,14 +897,12 @@ _mesa_meta_bind_rb_as_tex_image(struct gl_context *ctx,
if (tempTex == 0)
return false;
- *tex = tempTex;
-
- _mesa_BindTexture(target, *tex);
- *texObj = _mesa_lookup_texture(ctx, *tex);
+ _mesa_BindTexture(target, tempTex);
+ *texObj = _mesa_lookup_texture(ctx, tempTex);
texImage = _mesa_get_tex_image(ctx, *texObj, target, 0);
if (!ctx->Driver.BindRenderbufferTexImage(ctx, rb, texImage)) {
- _mesa_DeleteTextures(1, tex);
+ _mesa_DeleteTextures(1, &tempTex);
return false;
}
@@ -914,6 +912,7 @@ _mesa_meta_bind_rb_as_tex_image(struct gl_context *ctx,
}
assert(target == (*texObj)->Target);
+ assert(tempTex == (*texObj)->Name);
return true;
}