mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-07 18:09:44 +00:00
vulkan: apply enabled layers to device creation. also remove the layer setting from the example.
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@118 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -220,7 +220,7 @@ void vulkan_setup(MwWidget handle) {
|
||||
VkSemaphoreCreateInfo semaphoreInfo = {};
|
||||
VkFenceCreateInfo fenceInfo = {};
|
||||
|
||||
MwErrorEnum err;
|
||||
MwErrorEnum err = MwEsuccess;
|
||||
_vkGetInstanceProcAddr = MwVulkanGetField(handle, MwVulkanField_GetInstanceProcAddr, &err);
|
||||
if(err != MwEsuccess) {
|
||||
printf("Error getting vkGetInstanceProcAddr!\n%s\n", MwGetLastError());
|
||||
@@ -632,7 +632,6 @@ int main() {
|
||||
NULL);
|
||||
|
||||
MwVulkanEnableExtension(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
|
||||
MwVulkanEnableLayer("VK_LAYER_KHRONOS_validation");
|
||||
|
||||
vulkan = MwCreateWidget(MwVulkanClass, "vulkan", window, 50, 50, ow, oh);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
MwVulkanConfig vulkan_config = {
|
||||
.api_version = VK_API_VERSION_1_0,
|
||||
.vk_version = VK_VERSION_1_0,
|
||||
.validation_layers = VK_TRUE,
|
||||
.validation_layers = VK_FALSE,
|
||||
};
|
||||
|
||||
// convienence macro for handling vulkan errors
|
||||
@@ -351,8 +351,8 @@ static MwErrorEnum vulkan_devices_setup(MwWidget handle, vulkan_t* o) {
|
||||
.pEnabledFeatures = NULL,
|
||||
.enabledExtensionCount = o->vkDeviceExtensionCount,
|
||||
.ppEnabledExtensionNames = o->vkDeviceExtensions,
|
||||
.enabledLayerCount = 0,
|
||||
.ppEnabledLayerNames = NULL,
|
||||
.enabledLayerCount = o->vkLayerCount,
|
||||
.ppEnabledLayerNames = o->vkLayers,
|
||||
};
|
||||
|
||||
VK_CMD(_vkCreateDevice(o->vkPhysicalDevice, &createInfo, NULL, &o->vkLogicalDevice) != VK_SUCCESS);
|
||||
|
||||
Reference in New Issue
Block a user