VALIDATION [VUID-VkBufferCreateInfo-usage-requiredbitmask (0)] : vkCreateBuffer: value of pCreateInfo->usage must not be 0. The Vulkan spec states: usage must not be 0 (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkBufferCreateInfo-usage-requiredbitmask)
object info: (type: UNKNOWN, hndl: 0)
If we see that a resource doesn't request any usage, we should artificially add one, e.g. TRANSFER_SRC.
Are there any valid reasons to create resources with empty usage flags? Would it make more to disallow this and return an error?
I don't think there is any use of resources without usages, I'd say just not allow it.
Trying to recall/find what WebGPU upstream thinks about the issue. Do you recall @Kangz?
I think we said that 0-sized buffers were ok, not sure about no usage though.
Any update on this from the WebGPU side? Should we forbid empty usages or silently allow them?
The resolution from upstream is that empty buffer and texture usages should not be allowed. We need to add a bit of validation to make sure that's the case.