diff --git a/renderdoc/driver/gl/gl_replay.cpp b/renderdoc/driver/gl/gl_replay.cpp index 3d802195b..57aba30da 100644 --- a/renderdoc/driver/gl/gl_replay.cpp +++ b/renderdoc/driver/gl/gl_replay.cpp @@ -1150,7 +1150,6 @@ void GLReplay::SavePipelineState() target == eGL_TEXTURE_CUBE_MAP ? eGL_TEXTURE_CUBE_MAP_POSITIVE_X : target; GLenum fmt = eGL_NONE; gl.glGetTexLevelParameteriv(levelQueryType, 0, eGL_TEXTURE_INTERNAL_FORMAT, (GLint *)&fmt); - fmt = GetSizedFormat(gl.GetHookset(), target, fmt); if(IsDepthStencilFormat(fmt)) { GLint depthMode = eGL_DEPTH_COMPONENT; diff --git a/renderdoc/driver/gl/gl_resources.cpp b/renderdoc/driver/gl/gl_resources.cpp index 075fbfe68..a186f115f 100644 --- a/renderdoc/driver/gl/gl_resources.cpp +++ b/renderdoc/driver/gl/gl_resources.cpp @@ -361,7 +361,8 @@ GLenum GetBaseFormat(GLenum internalFormat) case eGL_R32I: case eGL_R32UI: case eGL_R16UI: - case eGL_R8UI: return eGL_RED_INTEGER; + case eGL_R8UI: + case eGL_RED_INTEGER: return eGL_RED_INTEGER; case eGL_RG8: case eGL_RG8_SNORM: case eGL_RG16: @@ -374,7 +375,8 @@ GLenum GetBaseFormat(GLenum internalFormat) case eGL_RG16I: case eGL_RG16UI: case eGL_RG32I: - case eGL_RG32UI: return eGL_RG_INTEGER; + case eGL_RG32UI: + case eGL_RG_INTEGER: return eGL_RG_INTEGER; case eGL_R3_G3_B2: case eGL_RGB4: case eGL_RGB5: @@ -396,7 +398,8 @@ GLenum GetBaseFormat(GLenum internalFormat) case eGL_RGB16I: case eGL_RGB16UI: case eGL_RGB32I: - case eGL_RGB32UI: return eGL_RGB_INTEGER; + case eGL_RGB32UI: + case eGL_RGB_INTEGER: return eGL_RGB_INTEGER; case eGL_RGBA2: case eGL_RGBA4: case eGL_RGB5_A1: @@ -416,19 +419,23 @@ GLenum GetBaseFormat(GLenum internalFormat) case eGL_RGBA16I: case eGL_RGBA16UI: case eGL_RGBA32UI: - case eGL_RGBA32I: return eGL_RGBA_INTEGER; - case eGL_BGRA: - case eGL_BGRA8_EXT: return eGL_BGRA; + case eGL_RGBA32I: + case eGL_RGBA_INTEGER: return eGL_RGBA_INTEGER; + case eGL_BGRA8_EXT: + case eGL_BGRA: return eGL_BGRA; case eGL_DEPTH_COMPONENT16: case eGL_DEPTH_COMPONENT24: case eGL_DEPTH_COMPONENT32: - case eGL_DEPTH_COMPONENT32F: return eGL_DEPTH_COMPONENT; + case eGL_DEPTH_COMPONENT32F: + case eGL_DEPTH_COMPONENT: return eGL_DEPTH_COMPONENT; case eGL_DEPTH24_STENCIL8: - case eGL_DEPTH32F_STENCIL8: return eGL_DEPTH_STENCIL; + case eGL_DEPTH32F_STENCIL8: + case eGL_DEPTH_STENCIL: return eGL_DEPTH_STENCIL; case eGL_STENCIL_INDEX1: case eGL_STENCIL_INDEX4: case eGL_STENCIL_INDEX8: - case eGL_STENCIL_INDEX16: return eGL_STENCIL; + case eGL_STENCIL_INDEX16: + case eGL_STENCIL: return eGL_STENCIL; default: break; } @@ -566,132 +573,6 @@ int GetNumMips(const GLHookSet &gl, GLenum target, GLuint tex, GLuint w, GLuint return RDCMAX(1, mips); } -GLenum GetSizedFormat(const GLHookSet &gl, GLenum target, GLenum internalFormat, GLenum type) -{ - switch(internalFormat) - { - // pick sized format ourselves for generic formats - case eGL_COMPRESSED_RED: return eGL_COMPRESSED_RED_RGTC1; - case eGL_COMPRESSED_RG: return eGL_COMPRESSED_RG_RGTC2; - case eGL_COMPRESSED_RGB: return eGL_COMPRESSED_RGB_S3TC_DXT1_EXT; - case eGL_COMPRESSED_RGBA: return eGL_COMPRESSED_RGBA_S3TC_DXT5_EXT; - case eGL_COMPRESSED_SRGB: return eGL_COMPRESSED_SRGB_S3TC_DXT1_EXT; - case eGL_COMPRESSED_SRGB_ALPHA: - return eGL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT; - - // only one sized format for SRGB - case eGL_SRGB: return eGL_SRGB8; - case eGL_SRGB_ALPHA: return eGL_SRGB8_ALPHA8; - - case eGL_RED: - case eGL_RG: - case eGL_RGB: - case eGL_RGBA: - case eGL_DEPTH_COMPONENT: - case eGL_STENCIL: - case eGL_STENCIL_INDEX: - case eGL_DEPTH_STENCIL: break; - default: - 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: - case eGL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case eGL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case eGL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case eGL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case eGL_TEXTURE_CUBE_MAP_NEGATIVE_Z: target = eGL_TEXTURE_CUBE_MAP; - default: break; - } - - GLint red, depth, stencil; - if(HasExt[ARB_internalformat_query2] && gl.glGetInternalformativ) - { - gl.glGetInternalformativ(target, internalFormat, eGL_INTERNALFORMAT_RED_SIZE, sizeof(GLint), - &red); - gl.glGetInternalformativ(target, internalFormat, eGL_INTERNALFORMAT_DEPTH_SIZE, sizeof(GLint), - &depth); - gl.glGetInternalformativ(target, internalFormat, eGL_INTERNALFORMAT_STENCIL_SIZE, sizeof(GLint), - &stencil); - } - else - { - // without the query function, just default to sensible defaults - red = 8; - if(type == eGL_FLOAT) - depth = 32; - else if(type == eGL_UNSIGNED_SHORT) - depth = 16; - else - depth = 24; - stencil = 8; - } - - switch(internalFormat) - { - case eGL_RED: - if(red == 32) - return eGL_R32F; - else if(red == 16) - return eGL_R16; - else - return eGL_R8; - case eGL_RG: - if(red == 32) - return eGL_RG32F; - else if(red == 16) - return eGL_RG16; - else - return eGL_RG8; - case eGL_RGB: - if(red == 32) - return eGL_RGB32F; - else if(red == 16) - return eGL_RGB16; - else - return eGL_RGB8; - case eGL_RGBA: - if(red == 32) - return eGL_RGBA32F; - else if(red == 16) - return eGL_RGBA16; - else - return eGL_RGBA8; - case eGL_STENCIL: - case eGL_STENCIL_INDEX: - if(stencil == 16) - return eGL_STENCIL_INDEX16; - else - return eGL_STENCIL_INDEX8; - case eGL_DEPTH_COMPONENT: - if(depth == 32) - return eGL_DEPTH_COMPONENT32F; - else if(depth == 16) - return eGL_DEPTH_COMPONENT16; - else - return eGL_DEPTH_COMPONENT24; - case eGL_DEPTH_STENCIL: - if(depth == 32) - return eGL_DEPTH32F_STENCIL8; - else - return eGL_DEPTH24_STENCIL8; - default: break; - } - - return internalFormat; -} - void GetFramebufferMipAndLayer(const GLHookSet &gl, GLenum framebuffer, GLenum attachment, GLint *mip, GLint *layer) { diff --git a/renderdoc/driver/gl/gl_resources.h b/renderdoc/driver/gl/gl_resources.h index 90ce466f7..577e7b2e3 100644 --- a/renderdoc/driver/gl/gl_resources.h +++ b/renderdoc/driver/gl/gl_resources.h @@ -34,8 +34,6 @@ size_t GetCompressedByteSize(GLsizei w, GLsizei h, GLsizei d, GLenum internalfor size_t GetByteSize(GLsizei w, GLsizei h, GLsizei d, GLenum format, GLenum type); GLenum GetBaseFormat(GLenum internalFormat); GLenum GetDataType(GLenum internalFormat); -GLenum GetSizedFormat(const GLHookSet &gl, GLenum target, GLenum internalFormat, - GLenum type = eGL_NONE); void GetFramebufferMipAndLayer(const GLHookSet &gl, GLenum framebuffer, GLenum attachment, GLint *mip, GLint *layer); void GetTextureSwizzle(const GLHookSet &gl, GLuint tex, GLenum target, GLenum *swizzleRGBA); diff --git a/renderdoc/driver/gl/wrappers/gl_emulated.cpp b/renderdoc/driver/gl/wrappers/gl_emulated.cpp index 280514dd5..494d7421e 100644 --- a/renderdoc/driver/gl/wrappers/gl_emulated.cpp +++ b/renderdoc/driver/gl/wrappers/gl_emulated.cpp @@ -972,6 +972,9 @@ static const format_data formats[] = { {eGL_RGB, eGL_UNSIGNED_BYTE, 3, 8, 0, 0}, {eGL_RGBA, eGL_UNSIGNED_BYTE, 4, 8, 0, 0}, {eGL_BGRA_EXT, eGL_UNSIGNED_BYTE, 4, 8, 0, 0}, + {eGL_DEPTH_COMPONENT, eGL_NONE, 0, 0, 24, 0}, + {eGL_STENCIL_INDEX, eGL_NONE, 0, 0, 0, 8}, + {eGL_DEPTH_STENCIL, eGL_NONE, 0, 0, 24, 8}, // depth and stencil formats {eGL_DEPTH_COMPONENT16, eGL_NONE, 0, 0, 16, 0}, diff --git a/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp index 8e98bd0ab..004d61932 100644 --- a/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp +++ b/renderdoc/driver/gl/wrappers/gl_framebuffer_funcs.cpp @@ -2211,8 +2211,6 @@ bool WrappedOpenGL::Serialise_glNamedRenderbufferStorageEXT(SerialiserType &ser, void WrappedOpenGL::glNamedRenderbufferStorageEXT(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height) { - internalformat = GetSizedFormat(m_Real, eGL_RENDERBUFFER, internalformat); - SERIALISE_TIME_CALL( m_Real.glNamedRenderbufferStorageEXT(renderbuffer, internalformat, width, height)); @@ -2249,8 +2247,6 @@ void WrappedOpenGL::glNamedRenderbufferStorageEXT(GLuint renderbuffer, GLenum in void WrappedOpenGL::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { - internalformat = GetSizedFormat(m_Real, eGL_RENDERBUFFER, internalformat); - SERIALISE_TIME_CALL(m_Real.glRenderbufferStorage(target, internalformat, width, height)); ResourceId rb = GetCtxData().m_Renderbuffer; @@ -2348,8 +2344,6 @@ void WrappedOpenGL::glNamedRenderbufferStorageMultisampleEXT(GLuint renderbuffer GLenum internalformat, GLsizei width, GLsizei height) { - internalformat = GetSizedFormat(m_Real, eGL_RENDERBUFFER, internalformat); - SERIALISE_TIME_CALL(m_Real.glNamedRenderbufferStorageMultisampleEXT( renderbuffer, samples, internalformat, width, height)); @@ -2387,8 +2381,6 @@ void WrappedOpenGL::glRenderbufferStorageMultisample(GLenum target, GLsizei samp GLenum internalformat, GLsizei width, GLsizei height) { - internalformat = GetSizedFormat(m_Real, eGL_RENDERBUFFER, internalformat); - SERIALISE_TIME_CALL( m_Real.glRenderbufferStorageMultisample(target, samples, internalformat, width, height)); diff --git a/renderdoc/driver/gl/wrappers/gl_texture_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_texture_funcs.cpp index b821a2c59..4f1006c99 100644 --- a/renderdoc/driver/gl/wrappers/gl_texture_funcs.cpp +++ b/renderdoc/driver/gl/wrappers/gl_texture_funcs.cpp @@ -664,8 +664,6 @@ void WrappedOpenGL::glTextureView(GLuint texture, GLenum target, GLuint origtext GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers)); @@ -2156,8 +2154,6 @@ void WrappedOpenGL::glTextureImage1DEXT(GLuint texture, GLenum target, GLint lev GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat, type); - SERIALISE_TIME_CALL(m_Real.glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels)); @@ -2168,8 +2164,6 @@ void WrappedOpenGL::glTextureImage1DEXT(GLuint texture, GLenum target, GLint lev void WrappedOpenGL::glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat, type); - SERIALISE_TIME_CALL( m_Real.glTexImage1D(target, level, internalformat, width, border, format, type, pixels)); @@ -2194,8 +2188,6 @@ void WrappedOpenGL::glMultiTexImage1DEXT(GLenum texunit, GLenum target, GLint le GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat, type); - SERIALISE_TIME_CALL(m_Real.glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels)); @@ -2395,8 +2387,6 @@ void WrappedOpenGL::glTextureImage2DEXT(GLuint texture, GLenum target, GLint lev GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat, type); - SERIALISE_TIME_CALL(m_Real.glTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, pixels)); @@ -2408,8 +2398,6 @@ void WrappedOpenGL::glTexImage2D(GLenum target, GLint level, GLint internalforma GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat, type); - SERIALISE_TIME_CALL(m_Real.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels)); @@ -2435,8 +2423,6 @@ void WrappedOpenGL::glMultiTexImage2DEXT(GLenum texunit, GLenum target, GLint le GLint border, GLenum format, GLenum type, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat, type); - SERIALISE_TIME_CALL(m_Real.glMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, pixels)); @@ -2619,8 +2605,6 @@ void WrappedOpenGL::glTextureImage3DEXT(GLuint texture, GLenum target, GLint lev GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat, type); - SERIALISE_TIME_CALL(m_Real.glTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, pixels)); @@ -2633,8 +2617,6 @@ void WrappedOpenGL::glTexImage3D(GLenum target, GLint level, GLint internalforma GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat, type); - SERIALISE_TIME_CALL(m_Real.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels)); @@ -2660,8 +2642,6 @@ void WrappedOpenGL::glMultiTexImage3DEXT(GLenum texunit, GLenum target, GLint le GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat, type); - SERIALISE_TIME_CALL(m_Real.glMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels)); @@ -2843,8 +2823,6 @@ void WrappedOpenGL::glCompressedTextureImage1DEXT(GLuint texture, GLenum target, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glCompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, imageSize, pixels)); @@ -2857,8 +2835,6 @@ void WrappedOpenGL::glCompressedTexImage1D(GLenum target, GLint level, GLenum in GLsizei width, GLint border, GLsizei imageSize, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, pixels)); @@ -2883,8 +2859,6 @@ void WrappedOpenGL::glCompressedMultiTexImage1DEXT(GLenum texunit, GLenum target GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glCompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, imageSize, pixels)); @@ -3196,8 +3170,6 @@ void WrappedOpenGL::glCompressedTextureImage2DEXT(GLuint texture, GLenum target, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glCompressedTextureImage2DEXT( texture, target, level, internalformat, width, height, border, imageSize, pixels)); @@ -3210,8 +3182,6 @@ void WrappedOpenGL::glCompressedTexImage2D(GLenum target, GLint level, GLenum in GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, pixels)); @@ -3237,8 +3207,6 @@ void WrappedOpenGL::glCompressedMultiTexImage2DEXT(GLenum texunit, GLenum target GLsizei height, GLint border, GLsizei imageSize, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glCompressedMultiTexImage2DEXT( texunit, target, level, internalformat, width, height, border, imageSize, pixels)); @@ -3435,8 +3403,6 @@ void WrappedOpenGL::glCompressedTextureImage3DEXT(GLuint texture, GLenum target, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *pixels) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glCompressedTextureImage3DEXT( texture, target, level, internalformat, width, height, depth, border, imageSize, pixels)); @@ -3449,8 +3415,6 @@ void WrappedOpenGL::glCompressedTexImage3D(GLenum target, GLint level, GLenum in GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, pixels)); @@ -3476,8 +3440,6 @@ void WrappedOpenGL::glCompressedMultiTexImage3DEXT(GLenum texunit, GLenum target GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *pixels) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glCompressedMultiTexImage3DEXT( texunit, target, level, internalformat, width, height, depth, border, imageSize, pixels)); @@ -3613,8 +3575,6 @@ void WrappedOpenGL::glCopyTextureImage1DEXT(GLuint texture, GLenum target, GLint GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat); - SERIALISE_TIME_CALL( m_Real.glCopyTextureImage1DEXT(texture, target, level, internalformat, x, y, width, border)); @@ -3627,8 +3587,6 @@ void WrappedOpenGL::glCopyMultiTexImage1DEXT(GLenum texunit, GLenum target, GLin GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat); - SERIALISE_TIME_CALL( m_Real.glCopyMultiTexImage1DEXT(texunit, target, level, internalformat, x, y, width, border)); @@ -3644,8 +3602,6 @@ void WrappedOpenGL::glCopyMultiTexImage1DEXT(GLenum texunit, GLenum target, GLin void WrappedOpenGL::glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat); - SERIALISE_TIME_CALL(m_Real.glCopyTexImage1D(target, level, internalformat, x, y, width, border)); // saves on queries of the currently bound texture to this target, as we don't have records on @@ -3769,8 +3725,6 @@ void WrappedOpenGL::glCopyTextureImage2DEXT(GLuint texture, GLenum target, GLint GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat); - SERIALISE_TIME_CALL(m_Real.glCopyTextureImage2DEXT(texture, target, level, internalformat, x, y, width, height, border)); @@ -3783,8 +3737,6 @@ void WrappedOpenGL::glCopyMultiTexImage2DEXT(GLenum texunit, GLenum target, GLin GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat); - SERIALISE_TIME_CALL(m_Real.glCopyMultiTexImage2DEXT(texunit, target, level, internalformat, x, y, width, height, border)); @@ -3800,8 +3752,6 @@ void WrappedOpenGL::glCopyMultiTexImage2DEXT(GLenum texunit, GLenum target, GLin void WrappedOpenGL::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { - internalformat = GetSizedFormat(m_Real, target, (GLenum)internalformat); - SERIALISE_TIME_CALL( m_Real.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border)); @@ -3901,8 +3851,6 @@ void WrappedOpenGL::Common_glTextureStorage1DEXT(ResourceId texId, GLenum target void WrappedOpenGL::glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glTextureStorage1DEXT(texture, target, levels, internalformat, width)); Common_glTextureStorage1DEXT(GetResourceManager()->GetID(TextureRes(GetCtx(), texture)), target, @@ -3912,8 +3860,6 @@ void WrappedOpenGL::glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei void WrappedOpenGL::glTextureStorage1D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width) { - internalformat = GetSizedFormat(m_Real, eGL_NONE, internalformat); - SERIALISE_TIME_CALL(m_Real.glTextureStorage1D(texture, levels, internalformat, width)); // saves on queries of the currently bound texture to this target, as we don't have records on @@ -3927,8 +3873,6 @@ void WrappedOpenGL::glTextureStorage1D(GLuint texture, GLsizei levels, GLenum in void WrappedOpenGL::glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glTexStorage1D(target, levels, internalformat, width)); // saves on queries of the currently bound texture to this target, as we don't have records on @@ -4032,8 +3976,6 @@ void WrappedOpenGL::Common_glTextureStorage2DEXT(ResourceId texId, GLenum target void WrappedOpenGL::glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL( m_Real.glTextureStorage2DEXT(texture, target, levels, internalformat, width, height)); @@ -4044,8 +3986,6 @@ void WrappedOpenGL::glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei void WrappedOpenGL::glTextureStorage2D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { - internalformat = GetSizedFormat(m_Real, eGL_NONE, internalformat); - SERIALISE_TIME_CALL(m_Real.glTextureStorage2D(texture, levels, internalformat, width, height)); // saves on queries of the currently bound texture to this target, as we don't have records on @@ -4060,8 +4000,6 @@ void WrappedOpenGL::glTextureStorage2D(GLuint texture, GLsizei levels, GLenum in void WrappedOpenGL::glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glTexStorage2D(target, levels, internalformat, width, height)); // saves on queries of the currently bound texture to this target, as we don't have records on @@ -4170,8 +4108,6 @@ void WrappedOpenGL::glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL( m_Real.glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth)); @@ -4182,8 +4118,6 @@ void WrappedOpenGL::glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei void WrappedOpenGL::glTextureStorage3D(GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { - internalformat = GetSizedFormat(m_Real, eGL_NONE, internalformat); - SERIALISE_TIME_CALL( m_Real.glTextureStorage3D(texture, levels, internalformat, width, height, depth)); @@ -4199,8 +4133,6 @@ void WrappedOpenGL::glTextureStorage3D(GLuint texture, GLsizei levels, GLenum in void WrappedOpenGL::glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glTexStorage3D(target, levels, internalformat, width, height, depth)); // saves on queries of the currently bound texture to this target, as we don't have records on @@ -4314,8 +4246,6 @@ void WrappedOpenGL::glTextureStorage2DMultisampleEXT(GLuint texture, GLenum targ GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glTextureStorage2DMultisampleEXT( texture, target, samples, internalformat, width, height, fixedsamplelocations)); @@ -4328,8 +4258,6 @@ void WrappedOpenGL::glTextureStorage2DMultisample(GLuint texture, GLsizei sample GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { - internalformat = GetSizedFormat(m_Real, eGL_NONE, internalformat); - SERIALISE_TIME_CALL(m_Real.glTextureStorage2DMultisample(texture, samples, internalformat, width, height, fixedsamplelocations)); @@ -4347,8 +4275,6 @@ void WrappedOpenGL::glTexStorage2DMultisample(GLenum target, GLsizei samples, GL GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations)); @@ -4373,8 +4299,6 @@ void WrappedOpenGL::glTexImage2DMultisample(GLenum target, GLsizei samples, GLen GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations)); @@ -4496,8 +4420,6 @@ void WrappedOpenGL::glTextureStorage3DMultisampleEXT(GLuint texture, GLenum targ GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glTextureStorage3DMultisampleEXT( texture, target, samples, internalformat, width, height, depth, fixedsamplelocations)); @@ -4511,8 +4433,6 @@ void WrappedOpenGL::glTextureStorage3DMultisample(GLuint texture, GLsizei sample GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { - internalformat = GetSizedFormat(m_Real, eGL_NONE, internalformat); - SERIALISE_TIME_CALL(m_Real.glTextureStorage3DMultisample(texture, samples, internalformat, width, height, depth, fixedsamplelocations)); @@ -4530,8 +4450,6 @@ void WrappedOpenGL::glTexStorage3DMultisample(GLenum target, GLsizei samples, GL GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations)); @@ -4557,8 +4475,6 @@ void WrappedOpenGL::glTexImage3DMultisample(GLenum target, GLsizei samples, GLen GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { - internalformat = GetSizedFormat(m_Real, target, internalformat); - SERIALISE_TIME_CALL(m_Real.glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations));