macOS/iOS fixes plus other generic fixes for clang and validation warnings (#1117)

* Fix clang Objective-C++ flags for macOS command line builds

* Fix getAssetPath() and getShaderBasePath() for macOS command line builds

* Protect debugUtilsMessageCallback() from failing when pMessageIdName is NULL

* Fix a few clang function override and mismatched type warnings

* Fix validation layer warnings on exit for computeraytracing example

* Fix regression in text visibility toggle for textOverlay example

* Support VK_USE_PLATFORM_METAL_EXT vs. deprecated VK_USE_PLATFORM_MACOS_MVK / DVK_USE_PLATFORM_IOS_MVK

* Check dynamic state features before enabling capabilities in dynamicstate example

* Fix vkCmdDraw() vertexCount argument (PARTICLE_COUNT) in particlesystem example

* Update examples list and restore benchmarking script (to top level)

* Fix validation warning in descriptorindexing example

* Fix device max recursion depth validation warnings in ray tracing examples

* Fix OpenMP build settings for texture3d example on all platforms

* Update and simplify build instructions for macOS

* Update CI script with correct library path for libomp on macOS x86_64

* Update CI scipt to install libomp prior to macOS builds

* Trying one more time to get the CI script working for macOS libomp

* Fix vertexCount argument using calculated size in particlesystem example

* Fix combined image descriptor offset calculation in descriptorbuffer example

* macOS: Support non-system level Vulkan SDK installs, with fallback to MoltenVK library
This commit is contained in:
SRSaunders 2024-05-04 07:53:08 -04:00 committed by GitHub
parent 4a0c8b8f23
commit bdfd4709ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 320 additions and 88 deletions

116
benchmark-all-validate.py Normal file
View file

@ -0,0 +1,116 @@
# Benchmark all examples
import subprocess
import sys
import os
import platform
EXAMPLES = [
"bloom",
"computecloth",
"computecullandlod",
"computenbody",
"computeparticles",
"computeraytracing",
"computeshader",
"conditionalrender",
"conservativeraster",
"debugprintf",
"debugutils",
"deferred",
"deferredmultisampling",
"deferredshadows",
"descriptorbuffer",
"descriptorindexing",
"descriptorsets",
"displacement",
"distancefieldfonts",
"dynamicrendering",
"dynamicstate",
"dynamicuniformbuffer",
"gears",
"geometryshader",
"gltfloading",
"gltfscenerendering",
"gltfskinning",
"graphicspipelinelibrary",
"hdr",
"imgui",
"indirectdraw",
"inlineuniformblocks",
"inputattachments",
"instancing",
"meshshader",
"multisampling",
"multithreading",
"multiview",
"negativeviewportheight",
"occlusionquery",
"offscreen",
"oit",
"parallaxmapping",
"particlesystem",
"pbrbasic",
"pbribl",
"pbrtexture",
"pipelines",
"pipelinestatistics",
"pushconstants",
"pushdescriptors",
"radialblur",
"rayquery",
"raytracingbasic",
"raytracingcallable",
"raytracinggltf",
"raytracingintersection",
"raytracingpositionfetch",
"raytracingreflections",
"raytracingsbtdata",
"raytracingshadows",
"raytracingtextures",
"shaderobjects",
"shadowmapping",
"shadowmappingcascade",
"shadowmappingomni",
"specializationconstants",
"sphericalenvmapping",
"ssao",
"stencilbuffer",
"subpasses",
"terraintessellation",
"tessellation",
"textoverlay",
"texture",
"texture3d",
"texturearray",
"texturecubemap",
"texturecubemaparray",
"texturemipmapgen",
"texturesparseresidency",
"triangle",
"variablerateshading",
"vertexattributes",
"viewportarray",
"vulkanscene"
]
CURR_INDEX = 0
ARGS = "-fullscreen -b -br 2 -v"
print("Benchmarking all examples...")
os.makedirs("./benchmark", exist_ok=True)
for example in EXAMPLES:
print("---- (%d/%d) Running %s in benchmark mode ----" % (CURR_INDEX+1, len(EXAMPLES), example))
if platform.system() == 'Linux' or platform.system() == 'Darwin':
RESULT_CODE = subprocess.call("./%s %s -bf ./benchmark/%s.csv 5" % (example, ARGS, example), shell=True)
else:
RESULT_CODE = subprocess.call("%s %s -bf ./benchmark/%s.csv 5" % (example, ARGS, example))
if RESULT_CODE == 0:
print("Results written to ./benchmark/%s.csv" % example)
else:
print("Error, result code = %d" % RESULT_CODE)
CURR_INDEX += 1
print("Benchmark run finished")