summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_gles3.cpp17
-rw-r--r--drivers/vulkan/rendering_device_driver_vulkan.cpp4
2 files changed, 12 insertions, 9 deletions
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp
index 6e7d4a6733..993197e371 100644
--- a/drivers/gles3/rasterizer_gles3.cpp
+++ b/drivers/gles3/rasterizer_gles3.cpp
@@ -130,14 +130,11 @@ void RasterizerGLES3::clear_depth(float p_depth) {
#ifdef CAN_DEBUG
static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const GLvoid *userParam) {
- if (type == _EXT_DEBUG_TYPE_OTHER_ARB) {
+ // These are ultimately annoying, so removing for now.
+ if (type == _EXT_DEBUG_TYPE_OTHER_ARB || type == _EXT_DEBUG_TYPE_PERFORMANCE_ARB) {
return;
}
- if (type == _EXT_DEBUG_TYPE_PERFORMANCE_ARB) {
- return; //these are ultimately annoying, so removing for now
- }
-
char debSource[256], debType[256], debSev[256];
if (source == _EXT_DEBUG_SOURCE_API_ARB) {
@@ -152,6 +149,8 @@ static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GL
strcpy(debSource, "Application");
} else if (source == _EXT_DEBUG_SOURCE_OTHER_ARB) {
strcpy(debSource, "Other");
+ } else {
+ ERR_FAIL_MSG(vformat("GL ERROR: Invalid or unhandled source '%d' in debug callback.", source));
}
if (type == _EXT_DEBUG_TYPE_ERROR_ARB) {
@@ -162,10 +161,8 @@ static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GL
strcpy(debType, "Undefined behavior");
} else if (type == _EXT_DEBUG_TYPE_PORTABILITY_ARB) {
strcpy(debType, "Portability");
- } else if (type == _EXT_DEBUG_TYPE_PERFORMANCE_ARB) {
- strcpy(debType, "Performance");
- } else if (type == _EXT_DEBUG_TYPE_OTHER_ARB) {
- strcpy(debType, "Other");
+ } else {
+ ERR_FAIL_MSG(vformat("GL ERROR: Invalid or unhandled type '%d' in debug callback.", type));
}
if (severity == _EXT_DEBUG_SEVERITY_HIGH_ARB) {
@@ -174,6 +171,8 @@ static void GLAPIENTRY _gl_debug_print(GLenum source, GLenum type, GLuint id, GL
strcpy(debSev, "Medium");
} else if (severity == _EXT_DEBUG_SEVERITY_LOW_ARB) {
strcpy(debSev, "Low");
+ } else {
+ ERR_FAIL_MSG(vformat("GL ERROR: Invalid or unhandled severity '%d' in debug callback.", severity));
}
String output = String() + "GL ERROR: Source: " + debSource + "\tType: " + debType + "\tID: " + itos(id) + "\tSeverity: " + debSev + "\tMessage: " + message;
diff --git a/drivers/vulkan/rendering_device_driver_vulkan.cpp b/drivers/vulkan/rendering_device_driver_vulkan.cpp
index 2a9e9ba264..97fd156584 100644
--- a/drivers/vulkan/rendering_device_driver_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_driver_vulkan.cpp
@@ -999,6 +999,10 @@ Error RenderingDeviceDriverVulkan::_initialize_allocator() {
allocator_info.physicalDevice = physical_device;
allocator_info.device = vk_device;
allocator_info.instance = context_driver->instance_get();
+ const bool use_1_3_features = physical_device_properties.apiVersion >= VK_API_VERSION_1_3;
+ if (use_1_3_features) {
+ allocator_info.flags |= VMA_ALLOCATOR_CREATE_KHR_MAINTENANCE5_BIT;
+ }
VkResult err = vmaCreateAllocator(&allocator_info, &allocator);
ERR_FAIL_COND_V_MSG(err, ERR_CANT_CREATE, "vmaCreateAllocator failed with error " + itos(err) + ".");