diff options
author | Kenneth Graunke <[email protected]> | 2014-03-05 19:21:00 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-03-07 22:45:11 -0800 |
commit | 9afca9198471e77a65f3ab70f2a9b4a67396b1a0 (patch) | |
tree | 53316fbdb695d27310a7962a3bef96f4c1c2f57d | |
parent | 1285bc87ac85fb744a1bc84b12fe2cbd528b9b08 (diff) |
meta: Drop redundant FBO creation code in GenerateMipmaps.
fallback_required() already creates the FBO in order to check whether we
can render to the format. So it's guaranteed to exist.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
-rw-r--r-- | src/mesa/drivers/common/meta_generate_mipmap.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c index 6db3f8fa7ee..6a0ccbdb7dd 100644 --- a/src/mesa/drivers/common/meta_generate_mipmap.c +++ b/src/mesa/drivers/common/meta_generate_mipmap.c @@ -208,10 +208,6 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, if (currentTexUnitSave != 0) _mesa_BindTexture(target, texObj->Name); - if (!mipmap->FBO) { - _mesa_GenFramebuffers(1, &mipmap->FBO); - } - if (!mipmap->Sampler) { _mesa_GenSamplers(1, &mipmap->Sampler); _mesa_BindSampler(ctx->Texture.CurrentUnit, mipmap->Sampler); @@ -236,6 +232,7 @@ _mesa_meta_GenerateMipmap(struct gl_context *ctx, GLenum target, _mesa_BindSampler(ctx->Texture.CurrentUnit, mipmap->Sampler); } + assert(mipmap->FBO != 0); _mesa_BindFramebuffer(GL_FRAMEBUFFER_EXT, mipmap->FBO); _mesa_TexParameteri(target, GL_GENERATE_MIPMAP, GL_FALSE); |