From d1975e91eeab1713ce1344df66030b1408382435 Mon Sep 17 00:00:00 2001 From: Stephen Saunders Date: Thu, 16 Sep 2021 01:44:45 -0400 Subject: [PATCH] Updated examples.h with sample classification and comments --- xcode/examples.h | 165 +++++++++++------------ xcode/examples.xcodeproj/project.pbxproj | 8 ++ 2 files changed, 85 insertions(+), 88 deletions(-) diff --git a/xcode/examples.h b/xcode/examples.h index 59952668..5ae4ca77 100644 --- a/xcode/examples.h +++ b/xcode/examples.h @@ -47,8 +47,6 @@ # include "../examples/texture3d/texture3d.cpp" #endif -// Does not run. Metal does not support passing matrices between shader stages. -// Update: runs on macOS Big Sur with Vulksn SDK 1.2.189.0 #ifdef MVK_texturecubemap # include "../examples/texturecubemap/texturecubemap.cpp" #endif @@ -57,9 +55,6 @@ # include "../examples/texturecubemaparray/texturecubemaparray.cpp" #endif -// Runs in Release mode. Does not run in Debug mode, as Metal validation will -// assert that UBO buffer length is too short for UBO size declared in shader. -// Update: runs on macOS Big Sur with Vulksn SDK 1.2.189.0 #ifdef MVK_texturearray # include "../examples/texturearray/texturearray.cpp" #endif @@ -80,8 +75,6 @@ # include "../examples/negativeviewportheight/negativeviewportheight.cpp" #endif -// Does not run. Metal does not support passing arrays between shader stages. -// Update: runs on macOS Big Sur with Vulksn SDK 1.2.189.0 #ifdef MVK_pushconstants # include "../examples/pushconstants/pushconstants.cpp" #endif @@ -94,20 +87,6 @@ # include "../examples/offscreen/offscreen.cpp" #endif -// Runs but nothing displays -#ifdef MVK_oit -# include "../examples/oit/oit.cpp" -#endif - -// Does not run - build issue. -#ifdef MVK_renderheadless -# include "../examples/renderheadless/renderheadless.cpp" -#endif - -#ifdef MVK_screenshot -# include "../examples/screenshot/screenshot.cpp" -#endif - #ifdef MVK_stencilbuffer # include "../examples/stencilbuffer/stencilbuffer.cpp" #endif @@ -128,6 +107,11 @@ # include "../examples/particlefire/particlefire.cpp" #endif +// Does not run - build issue on macOS. +#ifdef MVK_renderheadless +# include "../examples/renderheadless/renderheadless.cpp" +#endif + // ADVANCED @@ -135,6 +119,11 @@ # include "../examples/multithreading/multithreading.cpp" #endif +// Runs but cannot load gltf file from asset pack. +#ifdef MVK_gltfscenerendering +# include "../examples/gltfscenerendering/gltfscenerendering.cpp" +#endif + #ifdef MVK_multiview # include "../examples/multiview/multiview.cpp" #endif @@ -147,8 +136,6 @@ # include "../examples/indirectdraw/indirectdraw.cpp" #endif -// Does not run. Metal does not support passing matrices between shader stages. -// Update: runs on macOS Big Sur with Vulksn SDK 1.2.189.0 #ifdef MVK_hdr # include "../examples/hdr/hdr.cpp" #endif @@ -157,27 +144,19 @@ # include "../examples/occlusionquery/occlusionquery.cpp" #endif -// Does not run. Sampler arrays require Metal 2. -// Update: runs on macOS Big Sur with Vulksn SDK 1.2.189.0 #ifdef MVK_texturemipmapgen # include "../examples/texturemipmapgen/texturemipmapgen.cpp" #endif -// Does not run. Sparse binding not supported. +// Does not run. Sparse binding not supported by MoltenVK/Metal. #ifdef MVK_texturesparseresidency # include "../examples/texturesparseresidency/texturesparseresidency.cpp" #endif -// Runs but multisampling may not be working. #ifdef MVK_multisampling # include "../examples/multisampling/multisampling.cpp" #endif -// Runs but multisampling may not be working. -#ifdef MVK_deferredmultisampling -# include "../examples/deferredmultisampling/deferredmultisampling.cpp" -#endif - #ifdef MVK_shadowmapping # include "../examples/shadowmapping/shadowmapping.cpp" #endif @@ -198,29 +177,54 @@ # include "../examples/gltfskinning/gltfskinning.cpp" #endif -// Runs but cannot find input file. -#ifdef MVK_gltfscenerendering -# include "../examples/gltfscenerendering/gltfscenerendering.cpp" -#endif - #ifdef MVK_bloom # include "../examples/bloom/bloom.cpp" #endif -// Runs in Release mode. Debug mode Metal validation will assert. -// UBO buffer length is too short for UBO size declared in shader. -// Update: runs on macOS Big Sur with Vulksn SDK 1.2.189.0 +// Runs but nothing displays. +#ifdef MVK_oit +# include "../examples/oit/oit.cpp" +#endif + + +// DEFERRED + #ifdef MVK_deferred # include "../examples/deferred/deferred.cpp" #endif -// Runs in Release mode, but does not display content. -// Metal does not support the use of specialization constants to set array lengths. -// Update: runs on macOS Big Sur with Vulksn SDK 1.2.189.0 +// Does not run. Metal does not support geometry shaders. +#ifdef MVK_deferredshadows +# include "../examples/deferredshadows/deferredshadows.cpp" +#endif + +#ifdef MVK_deferredmultisampling +# include "../examples/deferredmultisampling/deferredmultisampling.cpp" +#endif + #ifdef MVK_ssao # include "../examples/ssao/ssao.cpp" #endif + +// DESCRIPTORS + +#ifdef MVK_descriptorsets +# include "../examples/descriptorsets/descriptorsets.cpp" +#endif + +#ifdef MVK_pushdescriptors +# include "../examples/pushdescriptors/pushdescriptors.cpp" +#endif + +// Does not run. Shader compilation fails with MoltenVK. +#ifdef MVK_descriptorindexing +# include "../examples/descriptorindexing/descriptorindexing.cpp" +#endif + + +// PHYSICALLY BASED RENDERING + #ifdef MVK_pbrbasic # include "../examples/pbrbasic/pbrbasic.cpp" #endif @@ -264,58 +268,53 @@ // COMPUTE -#ifdef MVK_computecloth -# include "../examples/computecloth/computecloth.cpp" -#endif - -#ifdef MVK_computecullandlod -# include "../examples/computecullandlod/computecullandlod.cpp" -#endif - -// Does not run - build issue. -#ifdef MVK_computeheadless -# include "../examples/computeheadless/computeheadless.cpp" +#ifdef MVK_computeparticles +# include "../examples/computeparticles/computeparticles.cpp" #endif #ifdef MVK_computenbody # include "../examples/computenbody/computenbody.cpp" #endif -#ifdef MVK_computeparticles -# include "../examples/computeparticles/computeparticles.cpp" -#endif - #ifdef MVK_computeraytracing # include "../examples/computeraytracing/computeraytracing.cpp" #endif +#ifdef MVK_computecullandlod +# include "../examples/computecullandlod/computecullandlod.cpp" +#endif + #ifdef MVK_computeshader # include "../examples/computeshader/computeshader.cpp" #endif +#ifdef MVK_computecloth +# include "../examples/computecloth/computecloth.cpp" +#endif + +// Does not run - build issue on macOS. +#ifdef MVK_computeheadless +# include "../examples/computeheadless/computeheadless.cpp" +#endif + // TESSELLATION -#ifdef MVK_displacement -# include "../examples/displacement/displacement.cpp" +#ifdef MVK_terraintessellation +# include "../examples/terraintessellation/terraintessellation.cpp" #endif #ifdef MVK_tessellation # include "../examples/tessellation/tessellation.cpp" #endif -#ifdef MVK_terraintessellation -# include "../examples/terraintessellation/terraintessellation.cpp" +#ifdef MVK_displacement +# include "../examples/displacement/displacement.cpp" #endif // GEOMETRY SHADER - Unsupported by Metal -// Does not run. Metal does not support geometry shaders. -#ifdef MVK_deferredshadows -# include "../examples/deferredshadows/deferredshadows.cpp" -#endif - // Does not run. Metal does not support geometry shaders. #ifdef MVK_geometryshader # include "../examples/geometryshader/geometryshader.cpp" @@ -329,22 +328,22 @@ // EXTENSIONS -// Does not run. MoltenVK does not support VK_EXT_conditional_rendering. +// Does not run. Requires VK_EXT_conditional_rendering. #ifdef MVK_conditionalrender # include "../examples/conditionalrender/conditionalrender.cpp" #endif -// Does not run. MoltenVK does not support VK_EXT_conservative_rasterization. +// Does not run. Requires VK_EXT_conservative_rasterization. #ifdef MVK_conservativeraster # include "../examples/conservativeraster/conservativeraster.cpp" #endif -// Does not run. MoltenVK does not support VK_NV_shading_rate_image. +// Does not run. Requires VK_NV_shading_rate_image. #ifdef MVK_variablerateshading # include "../examples/variablerateshading/variablerateshading.cpp" #endif -// Runs. MoltenVK supports VK_EXT_debug_marker. +// Runs. Requires VK_EXT_debug_marker. #ifdef MVK_debugmarker # include "../examples/debugmarker/debugmarker.cpp" #endif @@ -352,22 +351,8 @@ // MISC -// Does not run. Metal/MoltenVK does not support pipeline statistics. -#ifdef MVK_pipelinestatistics -# include "../examples/pipelinestatistics/pipelinestatistics.cpp" -#endif - -// Does not run. -#ifdef MVK_descriptorindexing -# include "../examples/descriptorindexing/descriptorindexing.cpp" -#endif - -#ifdef MVK_descriptorsets -# include "../examples/descriptorsets/descriptorsets.cpp" -#endif - -#ifdef MVK_pushdescriptors -# include "../examples/pushdescriptors/pushdescriptors.cpp" +#ifdef MVK_screenshot +# include "../examples/screenshot/screenshot.cpp" #endif #ifdef MVK_parallaxmapping @@ -387,7 +372,11 @@ # include "../examples/distancefieldfonts/distancefieldfonts.cpp" #endif -// Runs but mouse interaction not working. +// Does not run. MoltenVK/Metal does not support pipeline statistics. +#ifdef MVK_pipelinestatistics +# include "../examples/pipelinestatistics/pipelinestatistics.cpp" +#endif + #ifdef MVK_imgui # include "../examples/imgui/main.cpp" #endif diff --git a/xcode/examples.xcodeproj/project.pbxproj b/xcode/examples.xcodeproj/project.pbxproj index d4091e0d..501c306e 100644 --- a/xcode/examples.xcodeproj/project.pbxproj +++ b/xcode/examples.xcodeproj/project.pbxproj @@ -80,6 +80,8 @@ AA54A6E526E52CE400485C4A /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA54A20A26E52CE100485C4A /* imgui_demo.cpp */; }; AA54A6E626E52CE400485C4A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA54A20B26E52CE100485C4A /* imgui_draw.cpp */; }; AA54A6E726E52CE400485C4A /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AA54A20B26E52CE100485C4A /* imgui_draw.cpp */; }; + AAB0D0BF26F24001005DC611 /* VulkanRaytracingSample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAB0D0BE26F24001005DC611 /* VulkanRaytracingSample.cpp */; }; + AAB0D0C026F24001005DC611 /* VulkanRaytracingSample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AAB0D0BE26F24001005DC611 /* VulkanRaytracingSample.cpp */; }; C9788FD52044D78D00AB0892 /* VulkanAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9788FD32044D78D00AB0892 /* VulkanAndroid.cpp */; }; C9A79EFC204504E000696219 /* VulkanUIOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9A79EFB204504E000696219 /* VulkanUIOverlay.cpp */; }; C9A79EFD2045051D00696219 /* VulkanUIOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C9A79EFB204504E000696219 /* VulkanUIOverlay.cpp */; }; @@ -201,6 +203,8 @@ AA54A20926E52CE100485C4A /* LICENSE.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE.txt; sourceTree = ""; }; AA54A20A26E52CE100485C4A /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_demo.cpp; sourceTree = ""; }; AA54A20B26E52CE100485C4A /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imgui_draw.cpp; sourceTree = ""; }; + AAB0D0BE26F24001005DC611 /* VulkanRaytracingSample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VulkanRaytracingSample.cpp; sourceTree = ""; }; + AAB0D0C126F2400E005DC611 /* VulkanRaytracingSample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VulkanRaytracingSample.h; sourceTree = ""; }; C9788FD02044D78D00AB0892 /* benchmark.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = benchmark.hpp; sourceTree = ""; }; C9788FD22044D78D00AB0892 /* VulkanAndroid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VulkanAndroid.h; sourceTree = ""; }; C9788FD32044D78D00AB0892 /* VulkanAndroid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VulkanAndroid.cpp; sourceTree = ""; }; @@ -292,6 +296,8 @@ A951FF0E1E9C349000FA9144 /* VulkanInitializers.hpp */, AA54A1BA26E5276000485C4A /* VulkanglTFModel.cpp */, AA54A1BB26E5276000485C4A /* VulkanglTFModel.h */, + AAB0D0BE26F24001005DC611 /* VulkanRaytracingSample.cpp */, + AAB0D0C126F2400E005DC611 /* VulkanRaytracingSample.h */, AA54A1BF26E5276C00485C4A /* VulkanSwapChain.cpp */, AA54A1BE26E5276C00485C4A /* VulkanSwapChain.h */, AA54A1C326E5277600485C4A /* VulkanTexture.cpp */, @@ -565,6 +571,7 @@ A9B67B7A1C3AAE9800373FFD /* DemoViewController.mm in Sources */, A9B67B781C3AAE9800373FFD /* AppDelegate.m in Sources */, AA54A6CA26E52CE300485C4A /* texture.c in Sources */, + AAB0D0BF26F24001005DC611 /* VulkanRaytracingSample.cpp in Sources */, C9788FD52044D78D00AB0892 /* VulkanAndroid.cpp in Sources */, A951FF1B1E9C349000FA9144 /* VulkanTools.cpp in Sources */, AA54A1BC26E5276000485C4A /* VulkanglTFModel.cpp in Sources */, @@ -601,6 +608,7 @@ AA54A1BD26E5276000485C4A /* VulkanglTFModel.cpp in Sources */, A951FF181E9C349000FA9144 /* VulkanDebug.cpp in Sources */, AA54A6CB26E52CE300485C4A /* texture.c in Sources */, + AAB0D0C026F24001005DC611 /* VulkanRaytracingSample.cpp in Sources */, A9BC9B1D1EE8421F00384233 /* MVKExample.cpp in Sources */, A9B67B8C1C3AAEA200373FFD /* AppDelegate.m in Sources */, AA54A1C126E5276C00485C4A /* VulkanSwapChain.cpp in Sources */,