Skip to content

Commit

Permalink
Display Server support
Browse files Browse the repository at this point in the history
  • Loading branch information
pouleyKetchoupp committed Apr 7, 2020
1 parent af424b1 commit e167af3
Show file tree
Hide file tree
Showing 14 changed files with 948 additions and 743 deletions.
7 changes: 6 additions & 1 deletion drivers/vulkan/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion drivers/vulkan/rendering_device_vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions drivers/vulkan/rendering_device_vulkan.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions platform/android/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ android_files = [
"java_godot_io_wrapper.cpp",
"jni_utils.cpp",
"android_keys_utils.cpp",
"plugin/godot_plugin_jni.cpp",
"vulkan/vulkan_context_android.cpp"
"display_server_android.cpp",
"vulkan/vulkan_context_android.cpp",
]

env_android = env.Clone()
Expand Down
Loading

0 comments on commit e167af3

Please sign in to comment.