vkr: add a debug knob to enable the validation layer
Add vkr_context::force_validate
that can be set to enable the validation layer.
Comparing to setting the environment variable VK_INSTANCE_LAYERS
, this allows me to redirect the messages to vrend_printf
and to have control over the validation features. For the moment, it is a debug option that must be enabled at build time. We are evaluating the validation layer and might introduce a VIRGL_RENDERER_*
flag to toggle the option.