aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common/meta.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-11-11 14:33:30 -0800
committerIan Romanick <[email protected]>2016-02-10 10:59:36 -0800
commite273bbd60b7bf2ef19b575d2a16f47409b39ddf1 (patch)
treefbe376e4509ea82deecaa1bfacb73611194ddf69 /src/mesa/drivers/common/meta.c
parent1e055e9211fcb0a0e6595eeb433c580597a19dbd (diff)
meta: Use _mesa_CreateRenderbuffers instead of _mesa_GenRenderbuffers and _mesa_BindRenderbuffer
This has the advantage that it does not pollute the global binding state. It also enables later patches that will stop calling _mesa_GenRenderbuffers / _mesa_CreateRenderbuffers which pollute the renderbuffer namespace. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta.c')
-rw-r--r--src/mesa/drivers/common/meta.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 5f2e79637c2..26867d3969d 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -3071,10 +3071,10 @@ decompress_texture_image(struct gl_context *ctx,
/* Create/bind FBO/renderbuffer */
if (decompress_fbo->FBO == 0) {
+ _mesa_CreateRenderbuffers(1, &decompress_fbo->RBO);
+
_mesa_GenFramebuffers(1, &decompress_fbo->FBO);
- _mesa_GenRenderbuffers(1, &decompress_fbo->RBO);
_mesa_BindFramebuffer(GL_FRAMEBUFFER_EXT, decompress_fbo->FBO);
- _mesa_BindRenderbuffer(GL_RENDERBUFFER_EXT, decompress_fbo->RBO);
_mesa_FramebufferRenderbuffer(GL_FRAMEBUFFER_EXT,
GL_COLOR_ATTACHMENT0_EXT,
GL_RENDERBUFFER_EXT,
@@ -3086,9 +3086,8 @@ decompress_texture_image(struct gl_context *ctx,
/* alloc dest surface */
if (width > decompress_fbo->Width || height > decompress_fbo->Height) {
- _mesa_BindRenderbuffer(GL_RENDERBUFFER_EXT, decompress_fbo->RBO);
- _mesa_RenderbufferStorage(GL_RENDERBUFFER_EXT, rbFormat,
- width, height);
+ _mesa_NamedRenderbufferStorage(decompress_fbo->RBO, rbFormat,
+ width, height);
status = _mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE) {
/* If the framebuffer isn't complete then we'll leave