mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
handle NULL samplers array in glBindSamplers
fix based on glBindTextures
This commit is contained in:
committed by
GitHub
parent
1ee1d50b0a
commit
d48334049a
@@ -177,7 +177,10 @@ bool WrappedOpenGL::Serialise_glBindSamplers(GLuint first, GLsizei count, const
|
||||
|
||||
for(int32_t i = 0; i < Count; i++)
|
||||
{
|
||||
SERIALISE_ELEMENT(ResourceId, id, GetResourceManager()->GetID(SamplerRes(GetCtx(), samplers[i])));
|
||||
SERIALISE_ELEMENT(ResourceId, id,
|
||||
samplers && samplers[i]
|
||||
? GetResourceManager()->GetID(SamplerRes(GetCtx(), samplers[i]))
|
||||
: ResourceId());
|
||||
|
||||
if(m_State <= EXECUTING)
|
||||
{
|
||||
@@ -209,8 +212,9 @@ void WrappedOpenGL::glBindSamplers(GLuint first, GLsizei count, const GLuint *sa
|
||||
|
||||
m_ContextRecord->AddChunk(scope.Get());
|
||||
for(GLsizei i = 0; i < count; i++)
|
||||
GetResourceManager()->MarkResourceFrameReferenced(SamplerRes(GetCtx(), samplers[i]),
|
||||
eFrameRef_Read);
|
||||
if (samplers != NULL && samplers[i] != 0)
|
||||
GetResourceManager()->MarkResourceFrameReferenced(SamplerRes(GetCtx(), samplers[i]),
|
||||
eFrameRef_Read);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user