From a0538cdd026622f7f0f3e2ac1f9c2bd54c4a6014 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 13 Sep 2021 19:59:07 +0300 Subject: [PATCH] Tweak some texture allocation checks Sub_image calls allocate_ internally, so it should avoid doing unnecessary work. --- source/core/texture3d.cpp | 5 +++-- source/core/texturecube.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/core/texture3d.cpp b/source/core/texture3d.cpp index 9db8b061..bdb87882 100644 --- a/source/core/texture3d.cpp +++ b/source/core/texture3d.cpp @@ -57,8 +57,6 @@ void Texture3D::allocate(unsigned level) throw invalid_operation("Texture3D::allocate"); if(level>=levels) throw invalid_argument("Texture3D::allocate"); - if(allocated&(1<=levels) throw invalid_argument("TextureCube::allocate"); - if(allocated&(64<