Browse Source

vulkan: fix wrong shader context being used for vertex attrib bindings

rdb 5 years ago
parent
commit
c47b48a84d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      panda/src/vulkandisplay/vulkanGraphicsStateGuardian.cxx

+ 2 - 1
panda/src/vulkandisplay/vulkanGraphicsStateGuardian.cxx

@@ -2836,7 +2836,8 @@ make_pipeline(VulkanShaderContext *sc, const RenderState *state,
   state->get_attrib_def(color_attr);
 
   // Now describe each vertex attribute (ie. GeomVertexColumn).
-  const Shader *shader = _default_sc->get_shader();
+  const Shader *shader = sc->get_shader();
+  nassertr(shader != nullptr, VK_NULL_HANDLE);
   pvector<Shader::ShaderVarSpec>::const_iterator it;
 
   VkVertexInputAttributeDescription *attrib_desc = (VkVertexInputAttributeDescription *)