mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 23:46:41 +00:00
gearvr crash fix and mip level fix for gearvr swapchain
This commit is contained in:
committed by
Baldur Karlsson
parent
f46aa2944d
commit
579386dddb
@@ -1472,7 +1472,7 @@ void WrappedOpenGL::CreateVRAPITextureSwapChain(GLuint tex, GLenum textureType,
|
||||
}
|
||||
|
||||
gl_CurChunk = GLChunk::glTexParameteri;
|
||||
Common_glTextureParameteriEXT(record, textureType, eGL_TEXTURE_MAX_LEVEL, levels);
|
||||
Common_glTextureParameteriEXT(record, textureType, eGL_TEXTURE_MAX_LEVEL, levels - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -189,8 +189,6 @@ __attribute__((visibility("default"))) ovrTextureSwapChain *vrapi_CreateTextureS
|
||||
vrapi_hooks.SetupHooks();
|
||||
}
|
||||
|
||||
gl_CurChunk = GLChunk::vrapi_CreateTextureSwapChain2;
|
||||
|
||||
ovrTextureSwapChain *texture_swapchain = vrapi_hooks.vrapi_CreateTextureSwapChain2_real(
|
||||
type, format, width, height, levels, bufferCount);
|
||||
|
||||
@@ -206,6 +204,7 @@ __attribute__((visibility("default"))) ovrTextureSwapChain *vrapi_CreateTextureS
|
||||
GLenum internalformat = GetInternalFormat(format);
|
||||
GLenum textureType = GetTextureType(type);
|
||||
|
||||
gl_CurChunk = GLChunk::vrapi_CreateTextureSwapChain2;
|
||||
m_GLDriver->CreateVRAPITextureSwapChain(tex, textureType, internalformat, width, height,
|
||||
levels);
|
||||
}
|
||||
@@ -224,8 +223,6 @@ __attribute__((visibility("default"))) ovrTextureSwapChain *vrapi_CreateTextureS
|
||||
vrapi_hooks.SetupHooks();
|
||||
}
|
||||
|
||||
gl_CurChunk = GLChunk::vrapi_CreateTextureSwapChain;
|
||||
|
||||
ovrTextureSwapChain *texture_swapchain =
|
||||
vrapi_hooks.vrapi_CreateTextureSwapChain_real(type, format, width, height, levels, buffered);
|
||||
|
||||
@@ -241,6 +238,7 @@ __attribute__((visibility("default"))) ovrTextureSwapChain *vrapi_CreateTextureS
|
||||
GLenum internalformat = GetInternalFormat(format);
|
||||
GLenum textureType = GetTextureType(type);
|
||||
|
||||
gl_CurChunk = GLChunk::vrapi_CreateTextureSwapChain;
|
||||
m_GLDriver->CreateVRAPITextureSwapChain(tex, textureType, internalformat, width, height,
|
||||
levels);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user