From 011f3484c7ed9dccd842ac04e533fe1aea4b6269 Mon Sep 17 00:00:00 2001 From: Sascha Willems Date: Sat, 10 Sep 2022 08:29:50 +0200 Subject: [PATCH 1/2] Remove unnecessary flag Fixes #988 --- data/shaders/glsl/rayquery/scene.frag | 2 +- data/shaders/glsl/rayquery/scene.frag.spv | Bin 2024 -> 1924 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/data/shaders/glsl/rayquery/scene.frag b/data/shaders/glsl/rayquery/scene.frag index 059fc4d3..a0273b83 100644 --- a/data/shaders/glsl/rayquery/scene.frag +++ b/data/shaders/glsl/rayquery/scene.frag @@ -25,7 +25,7 @@ void main() outFragColor = vec4(diffuse, 1.0); rayQueryEXT rayQuery; - rayQueryInitializeEXT(rayQuery, topLevelAS, gl_RayFlagsTerminateOnFirstHitEXT | gl_RayFlagsSkipAABBEXT, 0xFF, inWorldPos, 0.01, L, 1000.0); + rayQueryInitializeEXT(rayQuery, topLevelAS, gl_RayFlagsTerminateOnFirstHitEXT, 0xFF, inWorldPos, 0.01, L, 1000.0); // Traverse the acceleration structure and store information about the first intersection (if any) rayQueryProceedEXT(rayQuery); diff --git a/data/shaders/glsl/rayquery/scene.frag.spv b/data/shaders/glsl/rayquery/scene.frag.spv index feae30abae7352d4913e29decc26c3900cbd68ad..0a90da4751795ca307e28d6139a07c1f6521904d 100644 GIT binary patch delta 291 zcmaFC-@?z!%%sfDz{<$L#lXSfIgvM%k#}OUDx<;1*3C?!YzzzxdO&Q=z`~#pqz!0?mf)=h?dI_#$HnkH&ybD)FH`Ntn z20_o!S@^->ob&$AycEBRg}|?7%z2i#tUW9WWA9)wi9TlUewZ<{)8%9EcG*GIEHH5w zl+9TWt^g05q`trB&(ZPn$W3z%vS+yZ=c{}2la2Y-#QvoGP5KJo271b0!^(@FOK!XP z23-fg)JwO3`cx;azIN)x`+HQEltSaE#0D4*(zPoKx5IDIipOBhm)^m8TBh6(D5ho7 iP2v$e0>@y^9Qpe+R)Jg0QBE-(v+F Date: Sat, 10 Sep 2022 09:05:07 +0200 Subject: [PATCH 2/2] Fix descriptor pool sizes Fixes #989 --- examples/rayquery/rayquery.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/rayquery/rayquery.cpp b/examples/rayquery/rayquery.cpp index a432fb3a..51bff8b1 100644 --- a/examples/rayquery/rayquery.cpp +++ b/examples/rayquery/rayquery.cpp @@ -1,7 +1,7 @@ /* * Vulkan Example - Using ray queries for hardware accelerated ray tracing queries in a fragment shader * -* Copyright (C) 2020 by Sascha Willems - www.saschawillems.de +* Copyright (C) 2020-2022 by Sascha Willems - www.saschawillems.de * * This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) */ @@ -289,11 +289,10 @@ public: void setupDescriptorPool() { std::vector poolSizes = { - vks::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 3), - vks::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 3), - vks::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, 3) + vks::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1), + vks::initializers::descriptorPoolSize(VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR, 1) }; - VkDescriptorPoolCreateInfo descriptorPoolInfo = vks::initializers::descriptorPoolCreateInfo(poolSizes, 3); + VkDescriptorPoolCreateInfo descriptorPoolInfo = vks::initializers::descriptorPoolCreateInfo(poolSizes, 1); VK_CHECK_RESULT(vkCreateDescriptorPool(device, &descriptorPoolInfo, nullptr, &descriptorPool)); }