Fix material invalidation on reimport.
* IF a texture was reimported (calling replace as an example), it would invalidate all materials using it, causing plenty of errors. * Added the possibility to get a notification when a uniform set is erased. * With this notification, materials can be queued for update properly.
This commit is contained in:
parent
b1068f9f01
commit
83addd6ee5
9 changed files with 42 additions and 15 deletions
|
|
@ -732,6 +732,8 @@ class RenderingDeviceVulkan : public RenderingDevice {
|
|||
LocalVector<AttachableTexture> attachable_textures; //used for validation
|
||||
Vector<Texture *> mutable_sampled_textures; //used for layout change
|
||||
Vector<Texture *> mutable_storage_textures; //used for layout change
|
||||
UniformSetInvalidatedCallback invalidated_callback = nullptr;
|
||||
void *invalidated_callback_userdata = nullptr;
|
||||
};
|
||||
|
||||
RID_Owner<UniformSet, true> uniform_set_owner;
|
||||
|
|
@ -1088,6 +1090,7 @@ public:
|
|||
|
||||
virtual RID uniform_set_create(const Vector<Uniform> &p_uniforms, RID p_shader, uint32_t p_shader_set);
|
||||
virtual bool uniform_set_is_valid(RID p_uniform_set);
|
||||
virtual void uniform_set_set_invalidation_callback(RID p_uniform_set, UniformSetInvalidatedCallback p_callback, void *p_userdata);
|
||||
|
||||
virtual Error buffer_update(RID p_buffer, uint32_t p_offset, uint32_t p_size, const void *p_data, uint32_t p_post_barrier = BARRIER_MASK_ALL); //works for any buffer
|
||||
virtual Error buffer_clear(RID p_buffer, uint32_t p_offset, uint32_t p_size, uint32_t p_post_barrier = BARRIER_MASK_ALL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue