[vulkan] Use VkValidationFeatureEnableEXT

It's currently unused as it does flag a pile of things I need to fix,
but I don't want to deal with them right now (though I have fixed a
few).
This commit is contained in:
Bill Currie 2023-12-22 12:28:11 +09:00
parent 1ca655c0d8
commit dc0b4880e3
3 changed files with 19 additions and 10 deletions

View file

@ -205,16 +205,26 @@ QFV_CreateInstance (vulkan_ctx_t *ctx,
const char **layers, const char **extensions)
{
VkApplicationInfo appInfo = {
VK_STRUCTURE_TYPE_APPLICATION_INFO, 0,
appName, appVersion,
PACKAGE_STRING, 0x000702ff, //FIXME version
VK_API_VERSION_1_3,
.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO,
.pApplicationName = appName,
.applicationVersion = appVersion,
.pEngineName = PACKAGE_STRING,
.engineVersion = 0x000702ff, //FIXME version
.apiVersion = VK_API_VERSION_1_3,
};
VkValidationFeatureEnableEXT valfeat_enable[] = {
// VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT,
};
#define valfeat_count sizeof(valfeat_enable)/sizeof(valfeat_enable[0])
VkValidationFeaturesEXT validation_features= {
.sType = VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT,
.enabledValidationFeatureCount = valfeat_count,
.pEnabledValidationFeatures = valfeat_enable,
};
VkInstanceCreateInfo createInfo = {
VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, 0, 0,
&appInfo,
0, 0,
0, 0,
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
.pNext = &validation_features,
.pApplicationInfo = &appInfo,
};
VkResult res;
VkInstance instance;

View file

@ -1390,7 +1390,6 @@ renderpasses = {
stages = (
$lighting.shader.vertex_splat,
$lighting.shader.debug_fragment,
);
vertexInput = $lighting.vertexInput_splat;
inputAssembly = $lighting.inputAssembly;

View file

@ -115,8 +115,8 @@ QFV_DestroyStagingBuffer (qfv_stagebuf_t *stage)
cmdBuf->size, cmdBuf->a);
dfunc->vkUnmapMemory (device->dev, stage->memory);
dfunc->vkFreeMemory (device->dev, stage->memory, 0);
dfunc->vkDestroyBuffer (device->dev, stage->buffer, 0);
dfunc->vkFreeMemory (device->dev, stage->memory, 0);
free (stage);
}