Browse Source

shaderpipeline: Fix missing state deps for ShaderAggregateInputBinding

rdb 1 year ago
parent
commit
95404fc83a

+ 9 - 0
panda/src/display/shaderInputBinding_impls.cxx

@@ -2102,6 +2102,15 @@ fetch_data(const State &state, void *into, bool pad_rows) const {
   }
 }
 
+/**
+ * Returns a mask indicating which state changes should cause the parameter to
+ * be respecified.
+ */
+int ShaderAggregateBinding::
+get_state_dep() const {
+  return Shader::D_frame | Shader::D_shader_inputs;
+}
+
 /**
  * Fetches the part of the shader input that is plain numeric data.
  */

+ 2 - 0
panda/src/display/shaderInputBinding_impls.h

@@ -315,6 +315,8 @@ class EXPCL_PANDA_DISPLAY ShaderAggregateBinding : public ShaderInputBinding {
 public:
   INLINE ShaderAggregateBinding(CPT_InternalName input, const ShaderType *type);
 
+  virtual int get_state_dep() const override;
+
   virtual void fetch_data(const State &state, void *into, bool pad_rows) const override;
 
   virtual ResourceId get_resource_id(int index, const ShaderType *type) const;