Преглед на файлове

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

rdb преди 5 години
родител
ревизия
c47b48a84d
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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);
   state->get_attrib_def(color_attr);
 
 
   // Now describe each vertex attribute (ie. GeomVertexColumn).
   // 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;
   pvector<Shader::ShaderVarSpec>::const_iterator it;
 
 
   VkVertexInputAttributeDescription *attrib_desc = (VkVertexInputAttributeDescription *)
   VkVertexInputAttributeDescription *attrib_desc = (VkVertexInputAttributeDescription *)