Clearing of clipmaps is the only place in Blender that uses non
uniform data (not all components of the cleared data to be exact
the same).
Vulkan has only the possibility to clear buffers with using a single
uint32_t. There were two solutions:
- Add compute shader to Vulkan backend.
- Make Eevee-next responsible to clear the clipmaps.
When fixing this in the Vulkan backend it could lead to other issues
as the backend isn't aware what is exactly required and might overwrite
active bindings. We chose to make it a responsibility of Eevee-next
as there it is clear what is needed.
Related issue: #105492
The previous API for clearing storage buffers was extracted from OpenGL.
OpenGL has many options to support for data conversions, striding and
sizzling. Metal and Vulkan don't have this inside the API and we have to
deal it ourselves.
Blender internally only uses a tiny subset for what is possible in OpenGL.
making the current API to difficult to implement on our future platforms
as we had to implement all cases, most even not used at all.
By changing the API we make future development easier as we only need to
implement what we are actually using.
*New API*
`GPU_storagebuf_clear_int(GPUStorageBuf* ssbo, int32_t* clear_data,
uint8_t clear_data_len);`
`GPU_storagebuf_clear_uint(GPUStorageBuf* ssbo, uint32_t* clear_data,
uint8_t clear_data_len);`
Related issue: #105492