diff --git a/projects/rtx/.gitignore b/projects/rtx/.gitignore index b0d802667a184267e6ee764264e976dfead8e9dd..8b485be2120c195aef2476fccfbc67428c3d3180 100644 --- a/projects/rtx/.gitignore +++ b/projects/rtx/.gitignore @@ -1 +1 @@ -first_scene +rtx diff --git a/projects/voxelization/src/main.cpp b/projects/voxelization/src/main.cpp index fe962ff3036c12734ab6d82e034499ab89312b37..68e3679cc7160cf7b53dccc6c05e004967494d1f 100644 --- a/projects/voxelization/src/main.cpp +++ b/projects/voxelization/src/main.cpp @@ -81,8 +81,20 @@ int main(int argc, const char** argv) { vkcv::Features features; features.requireExtension(VK_KHR_SWAPCHAIN_EXTENSION_NAME); - features.requireExtension(VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME); - features.requireExtension(VK_KHR_16BIT_STORAGE_EXTENSION_NAME); + + features.tryExtensionFeature<vk::PhysicalDevice16BitStorageFeatures>( + VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME, + [](vk::PhysicalDevice16BitStorageFeatures& features) { + features.setStorageBuffer16BitAccess(true); + } + ); + + features.tryExtensionFeature<vk::PhysicalDeviceShaderFloat16Int8Features>( + VK_KHR_16BIT_STORAGE_EXTENSION_NAME, + [](vk::PhysicalDeviceShaderFloat16Int8Features& features) { + features.setShaderFloat16(true); + } + ); vkcv::Core core = vkcv::Core::create( window, diff --git a/src/vkcv/Context.cpp b/src/vkcv/Context.cpp index 179ee7409304b213b2b1f01aac870a44146a87e6..78230aea028361f47238ccaa6e55778522194d12 100644 --- a/src/vkcv/Context.cpp +++ b/src/vkcv/Context.cpp @@ -260,21 +260,6 @@ namespace vkcv vk::PhysicalDevice physicalDevice = pickPhysicalDevice(instance); FeatureManager featureManager (physicalDevice); - - // TODO, FIXME: nach Tobi duerfen wir das hier auskommentieren. Es wird ein Fix benoetigt! -// if (featureManager.useExtension(VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME, false)) { -// featureManager.useFeatures<vk::PhysicalDeviceShaderFloat16Int8Features>( -// [](vk::PhysicalDeviceShaderFloat16Int8Features& features) { -// features.setShaderFloat16(true); -// }, false); -// } -// -// if (featureManager.useExtension(VK_KHR_16BIT_STORAGE_EXTENSION_NAME, false)) { -// featureManager.useFeatures<vk::PhysicalDevice16BitStorageFeatures>( -// [](vk::PhysicalDevice16BitStorageFeatures& features) { -// features.setStorageBuffer16BitAccess(true); -// }, false); -// } featureManager.useFeatures([](vk::PhysicalDeviceFeatures& features) { features.setFragmentStoresAndAtomics(true);