From b73c6e749e3f61cdadb445c1d50602e6d524dffc Mon Sep 17 00:00:00 2001 From: BZLZHH Date: Sun, 8 Jun 2025 23:23:23 +0800 Subject: [PATCH] [Fix] (Diligent/Texture): Remove useless judgement in glTexSubImage2D. --- MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp b/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp index 62e58242..47a2aba4 100644 --- a/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp +++ b/MG/MG_GL/Implementations/GL/Texture/GL_Texture.cpp @@ -455,13 +455,6 @@ namespace MG_GL::GL { } Diligent::TextureDesc desc = pTexture->GetDesc(); - if (xoffset < 0 || yoffset < 0 || - (xoffset + width) > desc.Width || - (yoffset + height) > desc.Height) { - MG_Util::Debug::LogE("TexSubImage2D: Update region out of bounds: [%d, %d, %d, %d] vs texture size [%u, %u]", - xoffset, yoffset, width, height, desc.Width, desc.Height); - return; - } Diligent::TextureSubResData SubResData; SubResData.pData = pixels;