vkr: add a meson option to enable the validation layer
When -Dvenus-validation=true
is given, vkr will enable the validation layer by
ctx->validate_level = VKR_CONTEXT_VALIDATE_ON;
ctx->validate_fatal = false;
VKR_CONTEXT_VALIDATE_ON
enables only API_PARAMETERS
validation. We would like to enable more validations and flip validate_fatal
to true, but we could not because
- app compat: most apps have validation errors and flipping
validate_fatal
to true stops them from running (e.g., even vulkaninfo would fail) - performance impact
This MR only lays the ground work. My next steps are to
- create a fuzzer
- create a list of VUIDs that are considered non-fatal
- make vkr more defensive (e.g., we don't need
OBJECT_LIFETIMES
with a bit of works) - gradually enable more validations
- flip
validate_fatal
to true
/cc @zzyiwei