message: Avoid trying to link invalid programs with no shaders in GL
diff: @@ -1252,6 +1252,8 @@ bool GLResourceManager::Serialise_InitialState(SerialiserType &ser, ResourceId i
  // eventually get one to work that's fine.
  m_Driver->SuppressDebugMessages(true);
  + if(numShaders)
  + {
  rdcarray<const char *> vertexOutputsPtr;
  vertexOutputsPtr.resize(vertexOutputs.size());
  for(size_t i = 0; i < vertexOutputs.size(); i++)
  @@ -1286,21 +1288,19 @@ bool GLResourceManager::Serialise_InitialState(SerialiserType &ser, ResourceId i
  drv.glGetProgramiv(initProg, eGL_LINK_STATUS, &status);
  }
  - m_Driver->SuppressDebugMessages(false);
  -
  if(status == 0)
  - {
  - if(numShaders == 0)
  - {
  - RDCWARN("No shaders attached to program");
  - }
  - else
  {
  char buffer[1025] = {0};
  drv.glGetProgramInfoLog(initProg, 1024, NULL, buffer);
  RDCERR("Link error: %s", buffer);
  }
  }
  + else
  + {
  + RDCWARN("No shaders attached to program");
  + }
  +
  + m_Driver->SuppressDebugMessages(false);
  // normally we'd serialise programs and uniforms into the initial state program, but on some
  // drivers uniform locations can change between it and the live program, so we serialise the
  