diff options
Diffstat (limited to 'drivers/vulkan')
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 12 | ||||
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 7 | ||||
-rw-r--r-- | drivers/vulkan/vulkan_context.h | 1 |
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 7ed87bf1fe..abbfde0b59 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -4119,13 +4119,13 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms, } break; case UNIFORM_TYPE_UNIFORM_BUFFER: { ERR_FAIL_COND_V_MSG(uniform.ids.size() != 1, RID(), - "Uniform buffer (binding: " + itos(uniform.binding) + ") must provide one ID (" + itos(uniform.ids.size()) + " provided)."); + "Uniform buffer supplied (binding: " + itos(uniform.binding) + ") must provide one ID (" + itos(uniform.ids.size()) + " provided)."); Buffer *buffer = uniform_buffer_owner.getornull(uniform.ids[0]); - ERR_FAIL_COND_V_MSG(!buffer, RID(), "Uniform buffer (binding: " + itos(uniform.binding) + ") is invalid."); + ERR_FAIL_COND_V_MSG(!buffer, RID(), "Uniform buffer supplied (binding: " + itos(uniform.binding) + ") is invalid."); ERR_FAIL_COND_V_MSG(buffer->size != (uint32_t)set_uniform.length, RID(), - "Uniform buffer (binding: " + itos(uniform.binding) + ") size (" + itos(buffer->size) + " does not match size of shader uniform: (" + itos(set_uniform.length) + ")."); + "Uniform buffer supplied (binding: " + itos(uniform.binding) + ") size (" + itos(buffer->size) + " does not match size of shader uniform: (" + itos(set_uniform.length) + ")."); write.dstArrayElement = 0; write.descriptorCount = 1; @@ -4137,13 +4137,13 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms, } break; case UNIFORM_TYPE_STORAGE_BUFFER: { ERR_FAIL_COND_V_MSG(uniform.ids.size() != 1, RID(), - "Storage buffer (binding: " + itos(uniform.binding) + ") must provide one ID (" + itos(uniform.ids.size()) + " provided)."); + "Storage buffer supplied (binding: " + itos(uniform.binding) + ") must provide one ID (" + itos(uniform.ids.size()) + " provided)."); Buffer *buffer = storage_buffer_owner.getornull(uniform.ids[0]); - ERR_FAIL_COND_V_MSG(!buffer, RID(), "Storage buffer (binding: " + itos(uniform.binding) + ") is invalid."); + ERR_FAIL_COND_V_MSG(!buffer, RID(), "Storage buffer supplied (binding: " + itos(uniform.binding) + ") is invalid."); ERR_FAIL_COND_V_MSG(buffer->size != (uint32_t)set_uniform.length, RID(), - "Storage buffer (binding: " + itos(uniform.binding) + ") size (" + itos(buffer->size) + " does not match size of shader uniform: (" + itos(set_uniform.length) + ")."); + "Storage buffer supplied (binding: " + itos(uniform.binding) + ") size (" + itos(buffer->size) + " does not match size of shader uniform: (" + itos(set_uniform.length) + ")."); write.dstArrayElement = 0; write.descriptorCount = 1; diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index b227ef01cb..2f02c20bdb 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -86,7 +86,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL VulkanContext::_debug_messenger_callback(VkDebugU free(message); - abort(); + // abort(); // Don't bail out, but keep going. return false; } @@ -416,8 +416,7 @@ Error VulkanContext::_create_physical_device() { // Query fine-grained feature support for this device. // If app has specific feature requirements it should check supported // features based on this query - VkPhysicalDeviceFeatures physDevFeatures; - vkGetPhysicalDeviceFeatures(gpu, &physDevFeatures); + vkGetPhysicalDeviceFeatures(gpu, &physical_device_features); #define GET_INSTANCE_PROC_ADDR(inst, entrypoint) \ { \ @@ -456,7 +455,7 @@ Error VulkanContext::_create_device() { .ppEnabledLayerNames = NULL, .enabledExtensionCount = enabled_extension_count, .ppEnabledExtensionNames = (const char *const *)extension_names, - .pEnabledFeatures = NULL, // If specific features are required, pass them in here + .pEnabledFeatures = &physical_device_features, // If specific features are required, pass them in here }; if (separate_present_queue) { queues[1].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO; diff --git a/drivers/vulkan/vulkan_context.h b/drivers/vulkan/vulkan_context.h index 4176f85c0f..50205c1abb 100644 --- a/drivers/vulkan/vulkan_context.h +++ b/drivers/vulkan/vulkan_context.h @@ -39,6 +39,7 @@ class VulkanContext { int frame_index; VkFence fences[FRAME_LAG]; VkPhysicalDeviceMemoryProperties memory_properties; + VkPhysicalDeviceFeatures physical_device_features; typedef struct { VkImage image; |