mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Don't change an already sized internalformat. Closes #990
This commit is contained in:
@@ -568,15 +568,6 @@ int GetNumMips(const GLHookSet &gl, GLenum target, GLuint tex, GLuint w, GLuint
|
||||
|
||||
GLenum GetSizedFormat(const GLHookSet &gl, GLenum target, GLenum internalFormat, GLenum type)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
// some types imply a sized internalFormat
|
||||
case eGL_UNSIGNED_SHORT_5_6_5: return eGL_RGB565;
|
||||
case eGL_UNSIGNED_SHORT_4_4_4_4: return eGL_RGBA4;
|
||||
case eGL_UNSIGNED_SHORT_5_5_5_1: return eGL_RGB5_A1;
|
||||
default: break;
|
||||
}
|
||||
|
||||
switch(internalFormat)
|
||||
{
|
||||
// pick sized format ourselves for generic formats
|
||||
@@ -604,6 +595,15 @@ GLenum GetSizedFormat(const GLHookSet &gl, GLenum target, GLenum internalFormat,
|
||||
return internalFormat; // already explicitly sized
|
||||
}
|
||||
|
||||
switch(type)
|
||||
{
|
||||
// some types imply a sized internalFormat
|
||||
case eGL_UNSIGNED_SHORT_5_6_5: return eGL_RGB565;
|
||||
case eGL_UNSIGNED_SHORT_4_4_4_4: return eGL_RGBA4;
|
||||
case eGL_UNSIGNED_SHORT_5_5_5_1: return eGL_RGB5_A1;
|
||||
default: break;
|
||||
}
|
||||
|
||||
switch(target)
|
||||
{
|
||||
case eGL_TEXTURE_CUBE_MAP_POSITIVE_X:
|
||||
|
||||
Reference in New Issue
Block a user