razerx100 / Terra

Renderer module based on Vulkan.
MIT License
0 stars 0 forks source link

Fix descriptor buffer recreation #30

Closed razerx100 closed 2 weeks ago

razerx100 commented 3 weeks ago

Right now I am doing a simple memcpy in case the descriptor buffer needs to be recreated. This will only work if only the new descriptors have been added at the end of the buffer. Which wouldn't work in most case. So, should fix this.

razerx100 commented 3 weeks ago

Should be fixed now. I have added a test to check. But I will keep this open until I have actually tested it while rendering.

razerx100 commented 3 weeks ago

Increasing the descriptor count will change the graphics layout and which will require all the Pipeline objects to be recreated.

razerx100 commented 2 weeks ago

Increasing the number of descriptors work now, but I think it is not really worth it. As it will change the DescriptorLayout, so the PipelineLayout will be invalidated and all the pipeline objects too. And right now I only need it for the textures, and I am creating uint16Max descriptors for it. We can keep more textures but only that amount bound at a time, I don't think we will need more than that bound at a time. So, recreating all the PSO doesn't seem worthwhile.