mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-20 13:36:41 +00:00
handle NULL textures array in glBindImageTextures
ported the fix from glBindTextures
This commit is contained in:
committed by
GitHub
parent
3695d7de6d
commit
1ee1d50b0a
@@ -557,7 +557,10 @@ bool WrappedOpenGL::Serialise_glBindImageTextures(GLuint first, GLsizei count, c
|
||||
|
||||
for(int32_t i = 0; i < Count; i++)
|
||||
{
|
||||
SERIALISE_ELEMENT(ResourceId, id, GetResourceManager()->GetID(TextureRes(GetCtx(), textures[i])));
|
||||
SERIALISE_ELEMENT(ResourceId, id,
|
||||
textures && textures[i]
|
||||
? GetResourceManager()->GetID(TextureRes(GetCtx(), textures[i]))
|
||||
: ResourceId());
|
||||
|
||||
if(m_State <= EXECUTING)
|
||||
{
|
||||
@@ -596,7 +599,7 @@ void WrappedOpenGL::glBindImageTextures(GLuint first, GLsizei count, const GLuin
|
||||
m_ContextRecord->AddChunk(scope.Get());
|
||||
|
||||
for(GLsizei i = 0; i < count; i++)
|
||||
if(textures[i])
|
||||
if(textures != NULL && textures[i] != 0)
|
||||
GetResourceManager()->MarkResourceFrameReferenced(TextureRes(GetCtx(), textures[i]),
|
||||
eFrameRef_Read);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user