Merge remote-tracking branch 'upstream/master'
This commit is contained in:
+15
-1
@@ -4,7 +4,7 @@ buildscript {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.7.3'
|
||||
classpath 'com.android.tools.build:gradle:8.12.1'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,4 +207,18 @@ android {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes.all { variant ->
|
||||
sourceSets {
|
||||
"${variant.name}" {
|
||||
jniLibs.srcDirs layout.buildDirectory.dir("libs${variant.name.capitalize()}")
|
||||
}
|
||||
}
|
||||
|
||||
externalNativeBuild{
|
||||
cmake {
|
||||
arguments '-DCMAKE_ANDROID_LIB_DIRECTORIES=' + layout.buildDirectory.dir("libs${variant.name.capitalize()}").get().asFile
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,14 +159,14 @@ khronos_validation.enables = VK_VALIDATION_FEATURE_ENABLE_THREAD_SAFETY_EXT
|
||||
endif()
|
||||
|
||||
if(USE_ANDROID_VALIDATION_LAYER)
|
||||
set(VVL_VERSION "1.3.231.1")
|
||||
set(VVL_VERSION "1.4.321.0")
|
||||
|
||||
if(NOT EXISTS ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip)
|
||||
if (EXISTS ${CMAKE_SOURCE_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip)
|
||||
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip SYMBOLIC)
|
||||
else()
|
||||
file(DOWNLOAD https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download/sdk-${VVL_VERSION}/android-binaries-${VVL_VERSION}.zip ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip
|
||||
EXPECTED_HASH SHA256=eec3a54222d6d33d4f787a13a45c60ac5b9e8d7bf795fc41e4242354a02e34ba)
|
||||
file(DOWNLOAD https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/download/vulkan-sdk-${VVL_VERSION}/android-binaries-${VVL_VERSION}.zip ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip
|
||||
EXPECTED_HASH SHA256=75f2881ba7af0507c8cec13b4bf6c95556c6333485cdb8be41f608fccf762128)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -174,12 +174,9 @@ if(USE_ANDROID_VALIDATION_LAYER)
|
||||
|
||||
file(ARCHIVE_EXTRACT INPUT ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayers-${VVL_VERSION}.zip DESTINATION ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayer)
|
||||
|
||||
add_library(vvl1 SHARED IMPORTED)
|
||||
set_property(TARGET vvl1 PROPERTY IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayer/${CMAKE_ANDROID_ARCH_ABI}/libVkLayer_khronos_validation.so)
|
||||
add_library(vvl2 SHARED IMPORTED)
|
||||
set_property(TARGET vvl2 PROPERTY IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/Vulkan-ValidationLayer/${CMAKE_ANDROID_ARCH_ABI}/libc++_shared.so)
|
||||
|
||||
target_link_libraries(wivrn vvl1 vvl2) # Hack to get gradle to package the validation layer in the APK
|
||||
file(COPY
|
||||
${CMAKE_BINARY_DIR}/Vulkan-ValidationLayer/android-binaries-${VVL_VERSION}/${CMAKE_ANDROID_ARCH_ABI}
|
||||
DESTINATION ${CMAKE_ANDROID_LIB_DIRECTORIES})
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
@@ -649,6 +649,7 @@ VkBool32 application::vulkan_debug_report_callback(
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
bool my_error = true;
|
||||
if (level >= spdlog::level::warn)
|
||||
{
|
||||
bool validation_layer_found = false;
|
||||
@@ -659,10 +660,13 @@ VkBool32 application::vulkan_debug_report_callback(
|
||||
|
||||
if (validation_layer_found && i.library != "libVkLayer_khronos_validation.so")
|
||||
spdlog::log(level, "{:#016x}: {} + {:#x}", i.pc, i.library, i.pc - i.library_base);
|
||||
|
||||
if (i.library == "libopenxr_loader.so")
|
||||
my_error = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (level >= spdlog::level::err)
|
||||
if (level >= spdlog::level::err and my_error)
|
||||
abort();
|
||||
#endif
|
||||
|
||||
|
||||
@@ -68,24 +68,7 @@ xr::swapchain::swapchain(xr::session & s, vk::raii::Device & device, vk::Format
|
||||
|
||||
images_.resize(array.size());
|
||||
for (uint32_t i = 0; i < array.size(); i++)
|
||||
{
|
||||
images_[i].image = array[i].image;
|
||||
|
||||
vk::ImageViewCreateInfo iv_create_info{
|
||||
.image = array[i].image,
|
||||
.viewType = vk::ImageViewType::e2D,
|
||||
.format = format,
|
||||
.components = {},
|
||||
.subresourceRange = {
|
||||
.aspectMask = vk::ImageAspectFlagBits::eColor,
|
||||
.baseMipLevel = 0,
|
||||
.levelCount = 1,
|
||||
.baseArrayLayer = 0,
|
||||
.layerCount = 1,
|
||||
}};
|
||||
|
||||
images_[i].view = vk::raii::ImageView(device, iv_create_info);
|
||||
}
|
||||
}
|
||||
|
||||
int xr::swapchain::acquire()
|
||||
|
||||
@@ -38,7 +38,6 @@ public:
|
||||
struct image
|
||||
{
|
||||
vk::Image image{};
|
||||
vk::raii::ImageView view = nullptr;
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
Reference in New Issue
Block a user