diff options
author | Ian Romanick <[email protected]> | 2015-11-11 15:57:25 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-02-10 10:59:42 -0800 |
commit | 4c6b0e017c909c07b0f328261f263b93cd605c8a (patch) | |
tree | 1c078c4a878c4cc4ee45bb38fb8d37d2ab63bc79 /src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c | |
parent | ab2b6317037cbe6746a3653d37562169e30c13da (diff) |
i965/meta: Return struct gl_renderbuffer* from brw_get_rb_for_slice instead of GL API handle
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c index c5f6c4f8fc8..4f3f7dbc78c 100644 --- a/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c +++ b/src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c @@ -423,7 +423,8 @@ brw_meta_stencil_blit(struct brw_context *brw, struct gl_context *ctx = &brw->ctx; struct blit_dims dims = *orig_dims; struct fb_tex_blit_state blit; - GLuint prog, fbo, rbo; + GLuint prog, fbo; + struct gl_renderbuffer *rb; GLenum target; _mesa_meta_fb_tex_blit_begin(ctx, &blit); @@ -436,13 +437,13 @@ brw_meta_stencil_blit(struct brw_context *brw, _mesa_GenFramebuffers(1, &fbo); /* Force the surface to be configured for level zero. */ - rbo = brw_get_rb_for_slice(brw, dst_mt, 0, dst_layer, true); + rb = brw_get_rb_for_slice(brw, dst_mt, 0, dst_layer, true); adjust_msaa(&dims, dst_mt->num_samples); adjust_tiling(&dims, dst_mt->num_samples); _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo); _mesa_FramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, - GL_RENDERBUFFER, rbo); + GL_RENDERBUFFER, rb->Name); _mesa_DrawBuffer(GL_COLOR_ATTACHMENT0); ctx->DrawBuffer->_Status = GL_FRAMEBUFFER_COMPLETE; @@ -474,7 +475,7 @@ error: _mesa_meta_fb_tex_blit_end(ctx, target, &blit); _mesa_meta_end(ctx); - _mesa_DeleteRenderbuffers(1, &rbo); + _mesa_DeleteRenderbuffers(1, &rb->Name); _mesa_DeleteFramebuffers(1, &fbo); } @@ -532,7 +533,8 @@ brw_meta_stencil_updownsample(struct brw_context *brw, .dst_x0 = 0, .dst_y0 = 0, .dst_x1 = dst->logical_width0, .dst_y1 = dst->logical_height0, .mirror_x = 0, .mirror_y = 0 }; - GLuint fbo, rbo; + GLuint fbo; + struct gl_renderbuffer *rb; if (dst->stencil_mt) dst = dst->stencil_mt; @@ -541,15 +543,15 @@ brw_meta_stencil_updownsample(struct brw_context *brw, _mesa_meta_begin(ctx, MESA_META_ALL); _mesa_GenFramebuffers(1, &fbo); - rbo = brw_get_rb_for_slice(brw, src, 0, 0, false); + rb = brw_get_rb_for_slice(brw, src, 0, 0, false); _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, fbo); _mesa_FramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, - GL_RENDERBUFFER, rbo); + GL_RENDERBUFFER, rb->Name); brw_meta_stencil_blit(brw, dst, 0, 0, &dims); brw_emit_mi_flush(brw); - _mesa_DeleteRenderbuffers(1, &rbo); + _mesa_DeleteRenderbuffers(1, &rb->Name); _mesa_DeleteFramebuffers(1, &fbo); } |