vulkan: Fix some common validation errors. (#1101)

* vulkan: Fix some extension support related validation errors.

* vulkan: Fix validation error on zero-size buffer.

* vulkan: Fix primitive list restart validation error.
This commit is contained in:
squidbus 2024-10-01 13:42:20 -07:00 committed by GitHub
parent 65f72372f0
commit 75adf7c8d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 37 additions and 9 deletions

View file

@ -233,6 +233,7 @@ void DefineEntryPoint(const IR::Program& program, EmitContext& ctx, Id main) {
ctx.AddExecutionMode(main, spv::ExecutionMode::OriginUpperLeft);
}
if (info.has_discard) {
ctx.AddExtension("SPV_EXT_demote_to_helper_invocation");
ctx.AddCapability(spv::Capability::DemoteToHelperInvocationEXT);
}
if (info.stores.Get(IR::Attribute::Depth)) {