summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2020-03-27 17:30:18 +0100
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2020-04-08 01:47:09 +0200
commite167af37373dd14e9d1fe888bcc482d0bd071951 (patch)
tree5a2f9ec90dd07e9485ae24b086f56ee251cfd1a5 /drivers
parentaf424b1c7ca5e09156d3e5b9bd914848ee0fed86 (diff)
Display Server support
Diffstat (limited to 'drivers')
-rw-r--r--drivers/vulkan/SCsub7
-rw-r--r--drivers/vulkan/rendering_device_vulkan.cpp5
-rw-r--r--drivers/vulkan/rendering_device_vulkan.h2
3 files changed, 12 insertions, 2 deletions
diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub
index 6390494c41..35c2d61530 100644
--- a/drivers/vulkan/SCsub
+++ b/drivers/vulkan/SCsub
@@ -7,7 +7,12 @@ env.add_source_files(env.drivers_sources, "*.cpp")
if env["platform"] == "android":
# Use NDK Vulkan headers
thirdparty_dir = env["ANDROID_NDK_ROOT"] + "/sources/third_party/vulkan/src"
- thirdparty_includes = [thirdparty_dir, thirdparty_dir + "/include", thirdparty_dir + "/layers", thirdparty_dir + "/layers/generated"]
+ thirdparty_includes = [
+ thirdparty_dir,
+ thirdparty_dir + "/include",
+ thirdparty_dir + "/layers",
+ thirdparty_dir + "/layers/generated",
+ ]
env.Prepend(CPPPATH=thirdparty_includes)
elif env["builtin_vulkan"]:
# Use bundled Vulkan headers
diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp
index dfa0169135..5f98df06b1 100644
--- a/drivers/vulkan/rendering_device_vulkan.cpp
+++ b/drivers/vulkan/rendering_device_vulkan.cpp
@@ -1564,7 +1564,10 @@ RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const T
image_create_info.pNext = nullptr;
image_create_info.flags = 0;
- // TODO: vkCreateImage fails with format list on Android (VK_ERROR_OUT_OF_HOST_MEMORY)
+#ifndef _MSC_VER
+#warning TODO check for support via RenderingDevice to enable on mobile when possible
+#endif
+ // vkCreateImage fails with format list on Android (VK_ERROR_OUT_OF_HOST_MEMORY)
#ifndef ANDROID_ENABLED
if (p_format.shareable_formats.size()) {
image_create_info.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h
index 208109bba3..b64a2e3323 100644
--- a/drivers/vulkan/rendering_device_vulkan.h
+++ b/drivers/vulkan/rendering_device_vulkan.h
@@ -37,8 +37,10 @@
#include "servers/rendering/rendering_device.h"
#ifdef DEBUG_ENABLED
+#ifndef _DEBUG
#define _DEBUG
#endif
+#endif
#include "vk_mem_alloc.h"
#include <vulkan/vulkan.h>
//todo: