message: Make sure to mark buffers dirty if a clear of their data isn't recorded
diff: @@ -3482,6 +3482,10 @@ void WrappedOpenGL::glClearNamedBufferDataEXT(GLuint buffer, GLenum internalform
  m_ContextRecord->AddChunk(scope.Get());
  }
  + else if(m_State == WRITING_IDLE)
  + {
  + GetResourceManager()->MarkDirtyResource(BufferRes(GetCtx(), buffer));
  + }
  }
  void WrappedOpenGL::glClearBufferData(GLenum target, GLenum internalformat, GLenum format,
  @@ -3491,19 +3495,27 @@ void WrappedOpenGL::glClearBufferData(GLenum target, GLenum internalformat, GLen
  m_Real.glClearBufferData(target, internalformat, format, type, data);
  - if(m_State == WRITING_CAPFRAME)
  + if(m_State >= WRITING)
  {
  GLResourceRecord *record = GetCtxData().m_BufferRecord[BufferIdx(target)];
  RDCASSERTMSG("Couldn't identify implicit object at binding. Mismatched or bad GLuint?", record,
  target);
  if(record)
  + {
  + if(m_State == WRITING_CAPFRAME)
  {
  SCOPED_SERIALISE_CONTEXT(CLEARBUFFERDATA);
  - Serialise_glClearNamedBufferDataEXT(record->Resource.name, internalformat, format, type, data);
  + Serialise_glClearNamedBufferDataEXT(record->Resource.name, internalformat, format, type,
  + data);
  m_ContextRecord->AddChunk(scope.Get());
  }
  + else if(m_State == WRITING_IDLE)
  + {
  + GetResourceManager()->MarkDirtyResource(record->GetResourceID());
  + }
  + }
  }
  }
  @@ -3602,6 +3614,10 @@ void WrappedOpenGL::glClearNamedBufferSubDataEXT(GLuint buffer, GLenum internalf
  m_ContextRecord->AddChunk(scope.Get());
  }
  + else if(m_State == WRITING_IDLE)
  + {
  + GetResourceManager()->MarkDirtyResource(BufferRes(GetCtx(), buffer));
  + }
  }
  void WrappedOpenGL::glClearNamedBufferSubData(GLuint buffer, GLenum internalformat, GLintptr offset,
  @@ -3620,13 +3636,15 @@ void WrappedOpenGL::glClearBufferSubData(GLenum target, GLenum internalformat, G
  m_Real.glClearBufferSubData(target, internalformat, offset, size, format, type, data);
  - if(m_State == WRITING_CAPFRAME)
  + if(m_State >= WRITING)
  {
  GLResourceRecord *record = GetCtxData().m_BufferRecord[BufferIdx(target)];
  RDCASSERTMSG("Couldn't identify implicit object at binding. Mismatched or bad GLuint?", record,
  target);
  if(record)
  + {
  + if(m_State == WRITING_CAPFRAME)
  {
  SCOPED_SERIALISE_CONTEXT(CLEARBUFFERSUBDATA);
  Serialise_glClearNamedBufferSubDataEXT(record->Resource.name, internalformat, offset, size,
  @@ -3634,6 +3652,11 @@ void WrappedOpenGL::glClearBufferSubData(GLenum target, GLenum internalformat, G
  m_ContextRecord->AddChunk(scope.Get());
  }
  + else if(m_State == WRITING_IDLE)
  + {
  + GetResourceManager()->MarkDirtyResource(record->GetResourceID());
  + }
  + }
  }
  }
  