Call GetSizedFormat everywhere

* In future should maybe warn for 1D/2D/3D variants that are
  only from storage calls, where it's invalid.
* It's needed for multisampled since we pipe TexImage*
  through these common functions, which can use unzied
  internalFormats.
This commit is contained in:
baldurk
2015-08-08 14:56:45 -07:00
parent 249b79e383
commit bc5afeeef4
@@ -3012,7 +3012,9 @@ void WrappedOpenGL::Common_glTextureStorage2DEXT(ResourceId texId, GLenum target
// proxy formats are used for querying texture capabilities, don't serialise these
if(IsProxyTarget(target) || internalformat == 0) return;
internalformat = GetSizedFormat(m_Real, target, internalformat);
if(m_State >= WRITING)
{
GLResourceRecord *record = GetResourceManager()->GetResourceRecord(texId);
@@ -3105,7 +3107,9 @@ void WrappedOpenGL::Common_glTextureStorage3DEXT(ResourceId texId, GLenum target
// proxy formats are used for querying texture capabilities, don't serialise these
if(IsProxyTarget(target) || internalformat == 0) return;
internalformat = GetSizedFormat(m_Real, target, internalformat);
if(m_State >= WRITING)
{
GLResourceRecord *record = GetResourceManager()->GetResourceRecord(texId);
@@ -3199,7 +3203,9 @@ void WrappedOpenGL::Common_glTextureStorage2DMultisampleEXT(ResourceId texId, GL
// proxy formats are used for querying texture capabilities, don't serialise these
if(IsProxyTarget(target) || internalformat == 0) return;
internalformat = GetSizedFormat(m_Real, target, internalformat);
if(m_State >= WRITING)
{
GLResourceRecord *record = GetResourceManager()->GetResourceRecord(texId);
@@ -3308,7 +3314,9 @@ void WrappedOpenGL::Common_glTextureStorage3DMultisampleEXT(ResourceId texId, GL
// proxy formats are used for querying texture capabilities, don't serialise these
if(IsProxyTarget(target) || internalformat == 0) return;
internalformat = GetSizedFormat(m_Real, target, internalformat);
if(m_State >= WRITING)
{
GLResourceRecord *record = GetResourceManager()->GetResourceRecord(texId);